Commit bca9decbda38a5eaa0f673500bb2a0bf45e2e447

Ozkan Sezer 2020-12-12T23:28:10

fix bug #5394 - define _DARWIN_C_SOURCE only if not already defined

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index a317c34..91ccaa4 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -31,7 +31,9 @@
 #include "SDL_config.h"
 
 #ifdef __APPLE__
-#define _DARWIN_C_SOURCE /* for memset_pattern4() */
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
+#endif
 #endif
 
 #ifdef HAVE_SYS_TYPES_H