瀏覽代碼

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

Ozkan Sezer 4 年之前
父節點
當前提交
bca9decbda
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      include/SDL_stdinc.h

+ 3 - 1
include/SDL_stdinc.h

@@ -31,7 +31,9 @@
 #include "SDL_config.h"
 #include "SDL_config.h"
 
 
 #ifdef __APPLE__
 #ifdef __APPLE__
-#define _DARWIN_C_SOURCE /* for memset_pattern4() */
+#ifndef _DARWIN_C_SOURCE
+#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
+#endif
 #endif
 #endif
 
 
 #ifdef HAVE_SYS_TYPES_H
 #ifdef HAVE_SYS_TYPES_H