瀏覽代碼

fix _ALL_SOURCE logic to avoid possible redefinition of _GNU_SOURCE

this could be an error if _GNU_SOURCE was already defined differently
by the application.
Rich Felker 10 年之前
父節點
當前提交
f929493c49
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/features.h

+ 1 - 1
include/features.h

@@ -1,7 +1,7 @@
 #ifndef _FEATURES_H
 #define _FEATURES_H
 
-#ifdef _ALL_SOURCE
+#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
 #define _GNU_SOURCE 1
 #endif