package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / vlc / 0007-strerror.patch
blobe9f3141168bd472ea9e9b8979208c61a75c28402
1 Fix compile error
3 CCLD vlc
4 /home/br/br3/output/build/vlc-2.2.1/src/.libs/libvlccore.so: undefined reference to `strerror_l'
6 Code for #else condition was taken from
7 http://patches.osdyson.org/patch/series/view/vlc/2.2.0~rc2-1+dyson2/dyson.patch
9 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
11 diff -uNr vlc-2.2.1.org/configure.ac vlc-2.2.1/configure.ac
12 --- vlc-2.2.1.org/configure.ac 2015-04-13 09:57:54.000000000 +0200
13 +++ vlc-2.2.1/configure.ac 2015-05-02 16:13:22.800448380 +0200
14 @@ -534,7 +534,7 @@
16 dnl Check for usual libc functions
17 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
18 -AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
19 +AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale strerror_l stricmp strnicmp strptime uselocale])
20 AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
21 AC_CHECK_FUNCS(fdatasync,,
22 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
23 diff -uNr vlc-2.2.1.org/src/posix/error.c vlc-2.2.1/src/posix/error.c
24 --- vlc-2.2.1.org/src/posix/error.c 2014-08-14 09:20:04.000000000 +0200
25 +++ vlc-2.2.1/src/posix/error.c 2015-05-02 16:25:24.075378369 +0200
26 @@ -31,6 +31,7 @@
28 static const char *vlc_strerror_l(int errnum, const char *lname)
30 +#ifdef HAVE_STRERROR_L
31 int saved_errno = errno;
32 locale_t loc = newlocale(LC_MESSAGES_MASK, lname, (locale_t)0);
34 @@ -51,6 +52,9 @@
35 const char *buf = strerror_l(errnum, loc);
37 freelocale(loc);
38 +#else
39 + const char *buf = strerror(errnum);
40 +#endif
41 return buf;