Преглед на файлове

Fixed bug 3011 - pthread/SDL_syssem.c requires _GNU_SOURCE

Ozkan Sezer

pthread/SDL_syssem.c requires _GNU_SOURCE predefined (like SDL_sysmutex.c),
otherwise sem_timedwait() prototype might not be available to it.  Problem
seen with glibc-2.3.4.
Sam Lantinga преди 10 години
родител
ревизия
98f9b88cef
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 1 1
      src/thread/pthread/SDL_sysmutex.c
  2. 3 0
      src/thread/pthread/SDL_syssem.c

+ 1 - 1
src/thread/pthread/SDL_sysmutex.c

@@ -23,8 +23,8 @@
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
-#include <pthread.h>
 #include <errno.h>
+#include <pthread.h>
 
 #include "SDL_thread.h"
 

+ 3 - 0
src/thread/pthread/SDL_syssem.c

@@ -20,6 +20,9 @@
 */
 #include "../../SDL_internal.h"
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
 #include <errno.h>
 #include <pthread.h>
 #include <semaphore.h>