nodogsplash: fix musl compatiblity
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Jun 2015 15:31:45 +0000 (17:31 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Jun 2015 15:35:39 +0000 (17:35 +0200)
 - Replace nonstandard `sys/unistd.h` includes with `unistd.h` ones
 - Add missing `fcntl.h` include to `libhttpd/protocol.c` in order to
   provide declarations for `open()`, `O_RDONLY` etc.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
nodogsplash/Makefile
nodogsplash/patches/100-musl-compat.patch [new file with mode: 0644]

index 38e8f2b152811e9c9f9f6305b1c2a69b2f4b67af..11fa5fca185f2c66617349b56ac7abdfe7a2f75c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=nodogsplash
 PKG_FIXUP:=autoreconf
 PKG_VERSION:=0.9_beta9.9.9
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/nodogsplash/patches/100-musl-compat.patch b/nodogsplash/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..bb186bc
--- /dev/null
@@ -0,0 +1,43 @@
+--- a/src/client_list.c
++++ b/src/client_list.c
+@@ -36,7 +36,7 @@
+ #include <pthread.h>
+ #include <sys/wait.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <string.h>
+--- a/src/firewall.c
++++ b/src/firewall.c
+@@ -37,7 +37,7 @@
+ #include <pthread.h>
+ #include <sys/wait.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <string.h>
+--- a/src/util.c
++++ b/src/util.c
+@@ -38,7 +38,7 @@
+ #include <pthread.h>
+ #include <sys/wait.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ #include <netinet/in.h>
+ #include <sys/ioctl.h>
+ #include <arpa/inet.h>
+--- a/libhttpd/protocol.c
++++ b/libhttpd/protocol.c
+@@ -25,6 +25,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <time.h>
++#include <fcntl.h>
+ #if defined(_WIN32) 
+ #else