aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch
blob: 3db3df34b26db7fbf3bd1395b62b073852b969fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/src/input/subtitles.c
+++ b/src/input/subtitles.c
@@ -42,6 +42,12 @@
 #include "input_internal.h"
 
 /**
+ * Drepper's alternative 
+ * http://en.wikibooks.org/wiki/C_Programming/C_Reference/nonstandard/strlcpy
+ */
+#define strlcpy(dst, src, n) *((char* ) mempcpy(dst, src, n)) = '\0'
+
+/**
  * The possible extensions for subtitle files we support
  */
 static const char *const sub_exts[] = { SLAVE_SPU_EXTENSIONS, "" };