瀏覽代碼

Fix redefinition of _GNU_SOURCE.

libc/misc/getloadavg/getloadavg.c:26: warning: "_GNU_SOURCE" redefined
   26 | #define _GNU_SOURCE
      |
In file included from <command-line>:
./include/libc-symbols.h:52: note: this is the location of the previous definition
   52 | #define _GNU_SOURCE     1

Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
Dmitry Chestnykh 3 月之前
父節點
當前提交
0fef8e7e06
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      libc/misc/getloadavg/getloadavg.c

+ 2 - 0
libc/misc/getloadavg/getloadavg.c

@@ -23,7 +23,9 @@
  * Imported from musl C library
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif /* _GNU_SOURCE */
 #include <stdlib.h>
 #include <sys/sysinfo.h>