vlc | branch: master | Zhao Zhili <[email protected]> | Wed Nov 6 00:44:55 2019 +0800| [a9309979ae1a999463dc9f68ebad94378c65b11c] | committer: Thomas Guillem
android/thread: fix compilation strerror_r can be GNU-specific on Android. Signed-off-by: Thomas Guillem <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a9309979ae1a999463dc9f68ebad94378c65b11c --- src/android/thread.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/android/thread.c b/src/android/thread.c index 0cce89e749..0d9191592e 100644 --- a/src/android/thread.c +++ b/src/android/thread.c @@ -49,22 +49,7 @@ static void vlc_thread_fatal_print (const char *action, int error, const char *function, const char *file, unsigned line) { - char buf[1000]; - const char *msg; - - switch (strerror_r (error, buf, sizeof (buf))) - { - case 0: - msg = buf; - break; - case ERANGE: /* should never happen */ - msg = "unknown (too big to display)"; - break; - default: - msg = "unknown (invalid error number)"; - break; - } - + const char *msg = vlc_strerror_c(error); fprintf(stderr, "LibVLC fatal error %s (%d) in thread %lu " "at %s:%u in %s\n Error message: %s\n", action, error, vlc_thread_id (), file, line, function, msg); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
