Commit f8fbd684 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_pthread_fatal: fix error message

The error message was overriden to "Illegal seek"
parent 02fac428
...@@ -101,14 +101,13 @@ void vlc_pthread_fatal (const char *action, int error, ...@@ -101,14 +101,13 @@ void vlc_pthread_fatal (const char *action, int error,
{ {
fprintf (stderr, "LibVLC fatal error %s in thread %lu at %s:%u: %d\n", fprintf (stderr, "LibVLC fatal error %s in thread %lu at %s:%u: %d\n",
action, vlc_threadid (), file, line, error); action, vlc_threadid (), file, line, error);
fflush (stderr);
/* Sometimes strerror_r() crashes too, so make sure we print an error /* Sometimes strerror_r() crashes too, so make sure we print an error
* message before we invoke it */ * message before we invoke it */
#ifdef __GLIBC__ #ifdef __GLIBC__
/* Avoid the strerror_r() prototype brain damage in glibc */ /* Avoid the strerror_r() prototype brain damage in glibc */
errno = error; errno = error;
dprintf (2, " Error message: %m at:\n"); fprintf (stderr, " Error message: %m at:\n");
#else #else
char buf[1000]; char buf[1000];
const char *msg; const char *msg;
...@@ -126,8 +125,8 @@ void vlc_pthread_fatal (const char *action, int error, ...@@ -126,8 +125,8 @@ void vlc_pthread_fatal (const char *action, int error,
break; break;
} }
fprintf (stderr, " Error message: %s\n", msg); fprintf (stderr, " Error message: %s\n", msg);
fflush (stderr);
#endif #endif
fflush (stderr);
#ifdef HAVE_BACKTRACE #ifdef HAVE_BACKTRACE
void *stack[20]; void *stack[20];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment