fix compile errors on linux
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 12:50:59 +0000 (13:50 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 3 Jan 2013 12:51:02 +0000 (13:51 +0100)
auth.c
main.c

diff --git a/auth.c b/auth.c
index c27488fcb7738bbefec7e40460faf7c704918aab..afab2c086eac5e8f07b8995547c1e97c12f3b85e 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -17,6 +17,8 @@
  *  limitations under the License.
  */
 
+#define _GNU_SOURCE
+#define _XOPEN_SOURCE  700
 #include "uhttpd.h"
 
 static LIST_HEAD(auth_realms);
diff --git a/main.c b/main.c
index 100e285b84bc720fb7112c3f19173d9134a500d5..26dc55c0f564f65bb777afbe53fc7273e2a5b89b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -17,6 +17,8 @@
  *  limitations under the License.
  */
 
+#define _GNU_SOURCE
+#define _XOPEN_SOURCE  700
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -25,6 +27,7 @@
 #include <errno.h>
 #include <netdb.h>
 #include <signal.h>
+#include <unistd.h>
 
 #include <libubox/usock.h>