[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Confuse-devel] [PATCH 1/5] confuse: ensure _GNU_SOURCE is defined befor
From: |
Carlo Marcelo Arenas Belon |
Subject: |
[Confuse-devel] [PATCH 1/5] confuse: ensure _GNU_SOURCE is defined before any included header |
Date: |
Sun, 30 Nov 2008 13:55:54 -0800 |
avoids the following warning because of an undefined strndup :
confuse.c: In function ‘cfg_getopt’:
confuse.c:147: warning: implicit declaration of function ‘strndup’
confuse.c:147: warning: incompatible implicit declaration of built-in
function ‘strndup’
confuse.c: In function ‘cfg_getopt_array’:
confuse.c:1580: warning: incompatible implicit declaration of built-in
function ‘strndup’
Signed-off-by: Carlo Marcelo Arenas Belon <address@hidden>
---
src/confuse.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/confuse.c b/src/confuse.c
index e63ab2e..003d0b9 100644
--- a/src/confuse.c
+++ b/src/confuse.c
@@ -18,8 +18,8 @@
# include <config.h>
#endif
-#include <sys/types.h>
#define _GNU_SOURCE
+#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>