summaryrefslogtreecommitdiff
path: root/package/vlc/patches/patch-src_posix_error_c
blob: ef51c996eacc4cc440bfac4d2bf776f3a466fcb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- vlc-2.2.4.orig/src/posix/error.c	2015-02-02 20:42:32.000000000 +0100
+++ vlc-2.2.4/src/posix/error.c	2016-09-24 20:34:45.824539253 +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);
 
@@ -48,9 +49,16 @@ static const char *vlc_strerror_l(int er
         errno = saved_errno;
     }
 
+#if defined(__UCLIBC__)
+    const char *buf = strerror_r(errnum, loc, 100);
+#else
     const char *buf = strerror_l(errnum, loc);
+#endif
 
     freelocale(loc);
+#else
+    const char *buf = strerror(errnum);
+#endif
     return buf;
 }