]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: ensure _GNU_SOURCE is defined early
authorVincent Bernat <bernat@luffy.cx>
Sat, 22 Dec 2012 22:30:22 +0000 (23:30 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sat, 22 Dec 2012 22:30:22 +0000 (23:30 +0100)
It is needed to use some extensions like `strnlen()`.

src/daemon/agent.c
src/daemon/lldpd.h
src/marshal.c

index c33fea5e3011768acc77cdd635de521da60cd1db..19212924052cc221ac5fa7e7bb10836bd9a67b3e 100644 (file)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "lldpd.h"
+
 #include <assert.h>
 
-#include "lldpd.h"
 #include "agent.h"
 #include "frame.h"
 
index 95653ca9764dcdf0efeaa87b5d238206d53c3312..ccbee06b64dee33b9552f08dfb8313a14983c5e6 100644 (file)
@@ -17,6 +17,7 @@
 
 #ifndef _LLDPD_H
 #define _LLDPD_H
+#define _GNU_SOURCE 1
 
 #if HAVE_CONFIG_H
 #  include <config.h>
@@ -28,7 +29,6 @@
 # define RUNNING_ON_VALGRIND 0
 #endif
 
-#define _GNU_SOURCE 1
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
index f154af93d8c05bf77c29e1e71b55bd70074d0bb8..cde976a36e5a35943047402f1f7504cf8b92b119 100644 (file)
@@ -15,6 +15,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#define _GNU_SOURCE 1
 #define MARSHAL_EXPORT
 #include "marshal.h"