knxd: fix compilation without sys/cdefs 13065/head
authorRosen Penev <rosenp@gmail.com>
Mon, 10 Aug 2020 20:16:55 +0000 (13:16 -0700)
committerRosen Penev <rosenp@gmail.com>
Mon, 10 Aug 2020 22:25:04 +0000 (15:25 -0700)
sys/cdefs.h does not come with musl. It's also deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/knxd/Makefile
net/knxd/patches/020-cdefs.patch [new file with mode: 0644]

index 774062c68e720dea6173d777f349435e49d2c8d7..e70085a0b22d420944f5c3ccab881dced3ac78f1 100644 (file)
@@ -12,7 +12,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=knxd
 PKG_VERSION:=0.14.39
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/knxd/knxd/tar.gz/$(PKG_VERSION)?
diff --git a/net/knxd/patches/020-cdefs.patch b/net/knxd/patches/020-cdefs.patch
new file mode 100644 (file)
index 0000000..d2924e2
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/src/include/eibclient.h
++++ b/src/include/eibclient.h
+@@ -27,10 +27,11 @@
+ #ifndef EIBCLIENT_H
+ #define EIBCLIENT_H
+-#include <sys/cdefs.h>
+ #include <stdint.h>
+-__BEGIN_DECLS;
++#ifdef __cplusplus
++extern "C" {
++#endif
+ #include "eibloadresult.h"
+@@ -935,5 +936,7 @@ int EIB_Cache_LastUpdates2_async (EIBConnection * con, uint32_t start,
+                                   uint32_t * end);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ #endif