summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch
blob: 6d2a46fb3cdee8f7346c200f0637f15491f82750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: vlc-2.1.2/src/input/subtitles.c
===================================================================
--- vlc-2.1.2.orig/src/input/subtitles.c
+++ vlc-2.1.2/src/input/subtitles.c
@@ -44,6 +44,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'
+
+/**
  * We are not going to autodetect more subtitle files than this.
  */
 #define MAX_SUBTITLE_FILES 128
OpenPOWER on IntegriCloud