Merge pull request #1491 from tru7/knxd
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 28 Jun 2015 12:57:24 +0000 (14:57 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 28 Jun 2015 12:57:24 +0000 (14:57 +0200)
knxd: fix musl compatibility

libs/pthsem/Makefile
net/ntpd/Makefile
net/ntripclient/Makefile
net/ntripclient/patches/100-musl-compat.patch [new file with mode: 0644]

index 6e07e6854cc8c4b49454eb7da10a66b0db3de134..54d7737e1cce9b8d7884daf47e4bd69d8593f471 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pthsem
 PKG_VERSION:=2.0.8
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=LGPL-2.1+
@@ -21,6 +21,7 @@ PKG_MD5SUM:=9144b26dcc27e67498d63dd5456f934c
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
+PKG_FORTIFY_SOURCE:=0
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -37,6 +38,13 @@ define Package/pthsem/description
   pthsem is an extend version, with support for semaphores added. It can be installed parallel to a normal pth.
 endef
 
+# The musl libc provides a proper implementation of sigaltstack() so
+# prevent configure from wrongly assuming a broken Linux platform
+ifeq ($(CONFIG_USE_MUSL),y)
+  CONFIGURE_VARS += \
+       ac_cv_check_sjlj=ssjlj
+endif
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pthsem-config $(1)/usr/bin/
index b9c9706cb0cd256e0a411dc36e0f3402a697983b..787e77955b5330572654dd89e0aed697e6f24cc3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ntp
 PKG_VERSION:=4.2.8p2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
@@ -93,7 +93,9 @@ endef
 CONFIGURE_VARS += \
        ac_cv_header_md5_h=no \
        ac_cv_lib_rt_sched_setscheduler=no \
-       ac_cv_header_dns_sd_h=no
+       ac_cv_header_dns_sd_h=no \
+       hw_cv_func_snprintf_c99=yes \
+       hw_cv_func_vsnprintf_c99=yes \
 
 CONFIGURE_ARGS += \
        --disable-all-clocks \
index 249f75ba21a1a182f5ddd5d5e387db1d38d905e1..2276b31ad27b8cbde23981e93412daf41729c511 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2011 segal.ubi.pt
-# Copyright (C) 2010-2014 OpenWrt.org
+# Copyright (C) 2010-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:=ntripclient
 PKG_VERSION:=1.5.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPL-2.0+
 
 PKG_SOURCE:=$(PKG_NAME).zip
@@ -36,6 +36,7 @@ endef
 define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        unzip $(DL_DIR)/$(PKG_SOURCE) -d $(PKG_BUILD_DIR)
+       $(call Build/Prepare/Default)
 endef
 
 MAKE_FLAGS += \
diff --git a/net/ntripclient/patches/100-musl-compat.patch b/net/ntripclient/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..10f690f
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/ntripclient.c
++++ b/ntripclient.c
+@@ -44,6 +44,7 @@
+   #include <fcntl.h>
+   #include <unistd.h>
+   #include <arpa/inet.h>
++  #include <sys/select.h>
+   #include <sys/socket.h>
+   #include <netinet/in.h>
+   #include <netdb.h>