Define _GNU_SOURCE when building SDL

This commit is contained in:
Sam Lantinga 2016-11-11 13:14:00 -08:00
parent 302a6e62aa
commit 74e1dd4c6f
8 changed files with 11 additions and 24 deletions

View file

@ -21,6 +21,15 @@
#ifndef _SDL_internal_h
#define _SDL_internal_h
/* Many of SDL's features require _GNU_SOURCE on various platforms
You can turn this off if necessary by using -D_GNU_SOURCE=0
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#elif !_GNU_SOURCE
#undef _GNU_SOURCE
#endif
#include "dynapi/SDL_dynapi.h"
#if SDL_DYNAMIC_API
@ -33,6 +42,6 @@
#include "SDL_config.h"
#endif
#endif /* _SDL_internal_h */
/* vi: set ts=4 sw=4 expandtab: */