]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
_GNU_SOURCE should be defined before including any headers 209/head
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 19 Jan 2017 15:21:34 +0000 (15:21 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Thu, 25 May 2017 20:33:20 +0000 (21:33 +0100)
per https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
"These directives must come before any #include of a system header file."

This actually causes a problem when compiling with newlib headers.

src/poolvendor.c

index ec25f9d4e20e5041e8d6a74d153227be5a4d9ba6..adb84d825fed3adcc0f9695dc7a3333b87a42615 100644 (file)
@@ -5,15 +5,14 @@
  * for further information
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 /* we need FNM_CASEFOLD */
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <fnmatch.h>
 
 #include "pool.h"