Fix compile error CCLD vlc /home/br/br3/output/build/vlc-2.2.1/src/.libs/libvlccore.so: undefined reference to `strerror_l' Code for #else condition was taken from http://patches.osdyson.org/patch/series/view/vlc/2.2.0~rc2-1+dyson2/dyson.patch Signed-off-by: Bernd Kuhls diff -uNr vlc-2.2.1.org/configure.ac vlc-2.2.1/configure.ac --- vlc-2.2.1.org/configure.ac 2015-04-13 09:57:54.000000000 +0200 +++ vlc-2.2.1/configure.ac 2015-05-02 16:13:22.800448380 +0200 @@ -534,7 +534,7 @@ dnl Check for usual libc functions AC_CHECK_DECLS([nanosleep],,,[#include ]) -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]) +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]) 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]) AC_CHECK_FUNCS(fdatasync,, [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.]) diff -uNr vlc-2.2.1.org/src/posix/error.c vlc-2.2.1/src/posix/error.c --- vlc-2.2.1.org/src/posix/error.c 2014-08-14 09:20:04.000000000 +0200 +++ vlc-2.2.1/src/posix/error.c 2015-05-02 16:25:24.075378369 +0200 @@ -31,6 +31,7 @@ static const char *vlc_strerror_l(int errnum, const char *lname) { +#ifdef HAVE_STRERROR_L int saved_errno = errno; locale_t loc = newlocale(LC_MESSAGES_MASK, lname, (locale_t)0); @@ -51,6 +52,9 @@ const char *buf = strerror_l(errnum, loc); freelocale(loc); +#else + const char *buf = strerror(errnum); +#endif return buf; }