From 98f9b88cef36182d7e0f577fe7e9374b146e28ce Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 13 Jun 2015 13:36:47 -0700 Subject: [PATCH] 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. --- src/thread/pthread/SDL_sysmutex.c | 2 +- src/thread/pthread/SDL_syssem.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/thread/pthread/SDL_sysmutex.c b/src/thread/pthread/SDL_sysmutex.c index 07a5ddc81..d7fa982c8 100644 --- a/src/thread/pthread/SDL_sysmutex.c +++ b/src/thread/pthread/SDL_sysmutex.c @@ -23,8 +23,8 @@ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif -#include #include +#include #include "SDL_thread.h" diff --git a/src/thread/pthread/SDL_syssem.c b/src/thread/pthread/SDL_syssem.c index 7e0ad0423..a89a262a7 100644 --- a/src/thread/pthread/SDL_syssem.c +++ b/src/thread/pthread/SDL_syssem.c @@ -20,6 +20,9 @@ */ #include "../../SDL_internal.h" +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include #include #include