[vlc-commits] Fix build error if strnstr is missing
Bernd Kuhls
git at videolan.org
Sat Apr 2 15:48:43 CEST 2016
vlc | branch: master | Bernd Kuhls <bernd.kuhls at t-online.de> | Sat Apr 2 15:33:18 2016 +0200| [7eedad33904b1b15b72a67ac332e4e735fd6c46b] | committer: Rémi Denis-Courmont
Fix build error if strnstr is missing
Support for strnstr was added in
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=4c1238c77239cdea38a44748f2800332818b6750
but for systems lacking it, it broke the build:
CC strnstr.lo
In file included from ../config.h:887:0,
from strnstr.c:22:
../include/vlc_fixups.h:157:45: error: unknown type name ‘size_t’
char * strnstr (const char *, const char *, size_t);
This patch fixes the problem by adding strnstr to a list of other
functions to get size_t defined.
Bug was reported to trac:
https://trac.videolan.org/vlc/ticket/16767
Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7eedad33904b1b15b72a67ac332e4e735fd6c46b
---
include/vlc_fixups.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index ce60430..95542a1 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -74,7 +74,8 @@ typedef struct
#if !defined (HAVE_POSIX_MEMALIGN) || \
!defined (HAVE_STRLCPY) || \
!defined (HAVE_STRNDUP) || \
- !defined (HAVE_STRNLEN)
+ !defined (HAVE_STRNLEN) || \
+ !defined (HAVE_STRNSTR)
# include <stddef.h> /* size_t */
#endif
More information about the vlc-commits
mailing list