summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch')
-rw-r--r--meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch
new file mode 100644
index 000000000..6d2a46fb3
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch
@@ -0,0 +1,17 @@
1Index: vlc-2.1.2/src/input/subtitles.c
2===================================================================
3--- vlc-2.1.2.orig/src/input/subtitles.c
4+++ vlc-2.1.2/src/input/subtitles.c
5@@ -44,6 +44,12 @@
6 #include "input_internal.h"
7
8 /**
9+ * Drepper's alternative
10+ * http://en.wikibooks.org/wiki/C_Programming/C_Reference/nonstandard/strlcpy
11+ */
12+#define strlcpy(dst, src, n) *((char* ) mempcpy(dst, src, n)) = '\0'
13+
14+/**
15 * We are not going to autodetect more subtitle files than this.
16 */
17 #define MAX_SUBTITLE_FILES 128