patch-src_posix_error_c 697 B

123456789101112131415161718192021222324252627
  1. --- vlc-2.2.4.orig/src/posix/error.c 2015-02-02 20:42:32.000000000 +0100
  2. +++ vlc-2.2.4/src/posix/error.c 2016-09-24 20:34:45.824539253 +0200
  3. @@ -31,6 +31,7 @@
  4. static const char *vlc_strerror_l(int errnum, const char *lname)
  5. {
  6. +#ifdef HAVE_STRERROR_L
  7. int saved_errno = errno;
  8. locale_t loc = newlocale(LC_MESSAGES_MASK, lname, (locale_t)0);
  9. @@ -48,9 +49,16 @@ static const char *vlc_strerror_l(int er
  10. errno = saved_errno;
  11. }
  12. +#if defined(__UCLIBC__)
  13. + const char *buf = strerror_r(errnum, loc, 100);
  14. +#else
  15. const char *buf = strerror_l(errnum, loc);
  16. +#endif
  17. freelocale(loc);
  18. +#else
  19. + const char *buf = strerror(errnum);
  20. +#endif
  21. return buf;
  22. }