[PATCH] ppp: fix compilation with musl 1.2.0

Rosen Penev rosenp at gmail.com
Tue Sep 1 17:50:15 EDT 2020


As sys/cdefs.h is no longer available, a __P definition is needed.

Fixes compilation with rp-pppoe-server.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/network/services/ppp/Makefile              |  2 +-
 package/network/services/ppp/patches/610-__P.patch | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 package/network/services/ppp/patches/610-__P.patch

diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile
index de73fdbe00..f28510421b 100644
--- a/package/network/services/ppp/Makefile
+++ b/package/network/services/ppp/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
diff --git a/package/network/services/ppp/patches/610-__P.patch b/package/network/services/ppp/patches/610-__P.patch
new file mode 100644
index 0000000000..61056b75a7
--- /dev/null
+++ b/package/network/services/ppp/patches/610-__P.patch
@@ -0,0 +1,14 @@
+--- a/pppd/pppd.h
++++ b/pppd/pppd.h
+@@ -61,9 +61,11 @@
+ 
+ #if defined(__STDC__)
+ #include <stdarg.h>
++#define __P(x)	x
+ #define __V(x)	x
+ #else
+ #include <varargs.h>
++#define __P(x)	()
+ #define __V(x)	(va_alist) va_dcl
+ #define const
+ #define volatile
-- 
2.26.2




More information about the openwrt-devel mailing list