[vlc-commits] android/thread: fix compilation
Zhao Zhili
git at videolan.org
Thu Nov 7 09:58:58 CET 2019
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | 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 <thomas at gllm.fr>
> 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);
More information about the vlc-commits
mailing list