From 419637e17f09164c852dc9e93bfa8a6129f2ab13 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 25 Jun 2015 16:30:32 +0200 Subject: [PATCH] sstp-client: fix musl compatibility - Ship a `net/ppp_defs.h` replacement header since musl does not provide one but `pppd/pppd.h` provided by pppd is needing it. - Add missing `sys/types.h` includes Signed-off-by: Jo-Philipp Wich --- net/sstp-client/Makefile | 4 ++- net/sstp-client/patches/100-musl-compat.patch | 33 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 net/sstp-client/patches/100-musl-compat.patch diff --git a/net/sstp-client/Makefile b/net/sstp-client/Makefile index 6e6526982..baea8d2be 100644 --- a/net/sstp-client/Makefile +++ b/net/sstp-client/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2014 OpenWrt.org +# Copyright (C) 2006-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -18,6 +18,8 @@ PKG_LICENSE=GPLv2 include $(INCLUDE_DIR)/package.mk +TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include + define Package/sstp-client SECTION:=net CATEGORY:=Network diff --git a/net/sstp-client/patches/100-musl-compat.patch b/net/sstp-client/patches/100-musl-compat.patch new file mode 100644 index 000000000..d19b2fa17 --- /dev/null +++ b/net/sstp-client/patches/100-musl-compat.patch @@ -0,0 +1,33 @@ +--- /dev/null ++++ b/include/net/ppp_defs.h +@@ -0,0 +1,10 @@ ++#ifndef _NET_PPP_DEFS_H ++#define _NET_PPP_DEFS_H 1 ++ ++#define __need_time_t ++#include ++ ++#include ++#include ++ ++#endif /* net/ppp_defs.h */ +--- a/src/libsstp-log/sstp-log-syslog.c ++++ b/src/libsstp-log/sstp-log-syslog.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + #include +--- a/src/libsstp-log/sstp-log-std.c ++++ b/src/libsstp-log/sstp-log-std.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include +