From: Steven Barth Date: Fri, 19 Jun 2015 16:38:44 +0000 (+0200) Subject: strongswan: fix musl builds, reenable lost modules X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=52b28091fdbb0c9f0cadae3ac3ab3f58058157bb;p=feed%2Fpackages.git strongswan: fix musl builds, reenable lost modules Signed-off-by: Steven Barth --- diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index b1ba0f2843..840b02e11c 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -70,6 +70,7 @@ PKG_MOD_AVAILABLE:= \ smp \ socket-default \ socket-dynamic \ + sql \ sqlite \ stroke \ test-vectors \ @@ -177,6 +178,7 @@ $(call Package/strongswan/Default) +strongswan-mod-sha2 \ +strongswan-mod-smp \ +strongswan-mod-socket-default \ + +strongswan-mod-sql \ +strongswan-mod-sqlite \ +strongswan-mod-stroke \ +strongswan-mod-test-vectors \ @@ -462,7 +464,7 @@ $(eval $(call BuildPlugin,load-tester,load testing,)) $(eval $(call BuildPlugin,nonce,nonce genereation,)) $(eval $(call BuildPlugin,md4,MD4 crypto,)) $(eval $(call BuildPlugin,md5,MD5 crypto,)) -$(eval $(call BuildPlugin,mysql,MySQL database interface,+PACKAGE_strongswan-mod-mysql:libmysqlclient-r)) +$(eval $(call BuildPlugin,mysql,MySQL database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-mysql:libmysqlclient-r)) $(eval $(call BuildPlugin,openssl,OpenSSL crypto,+PACKAGE_strongswan-mod-openssl:libopenssl)) $(eval $(call BuildPlugin,pem,PEM decoding,)) $(eval $(call BuildPlugin,pgp,PGP key decoding,)) @@ -478,7 +480,8 @@ $(eval $(call BuildPlugin,sha2,SHA2 crypto,)) $(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan-mod-smp:libxml2)) $(eval $(call BuildPlugin,socket-default,default socket implementation for charon,)) $(eval $(call BuildPlugin,socket-dynamic,dynamic socket implementation for charon,)) -$(eval $(call BuildPlugin,sqlite,SQLite database interface,+PACKAGE_strongswan-mod-sqlite:libsqlite3)) +$(eval $(call BuildPlugin,sql,SQL database interface,)) +$(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-sqlite:libsqlite3)) $(eval $(call BuildPlugin,stroke,Stroke,+strongswan-utils)) $(eval $(call BuildPlugin,test-vectors,crypto test vectors,)) $(eval $(call BuildPlugin,uci,UCI config interface,+PACKAGE_strongswan-mod-uci:libuci)) diff --git a/net/strongswan/patches/101-musl-fixes.patch b/net/strongswan/patches/101-musl-fixes.patch new file mode 100644 index 0000000000..3604219a55 --- /dev/null +++ b/net/strongswan/patches/101-musl-fixes.patch @@ -0,0 +1,73 @@ +--- a/src/libstrongswan/library.h ++++ b/src/libstrongswan/library.h +@@ -118,6 +118,7 @@ + #include "utils/leak_detective.h" + #include "plugins/plugin_loader.h" + #include "settings/settings.h" ++#include "musl.h" + + typedef struct library_t library_t; + +--- /dev/null ++++ b/src/libstrongswan/musl.h +@@ -0,0 +1,27 @@ ++#include ++ ++#define crypt x_crypt ++#define encrypt x_encrypt ++#include ++ ++#define fd_set x_fd_set ++#define ino_t x_ino_t ++#define off_t x_off_t ++#define loff_t x_loff_t ++#define dev_t x_dev_t ++#define nlink_t x_nlink_t ++#define timer_t x_timer_t ++#define blkcnt_t x_blkcnt_t ++#define __kernel_nlink_t void ++ ++#include ++ ++#undef fd_set ++#undef ino_t ++#undef off_t ++#undef dev_t ++#undef nlink_t ++#undef timer_t ++#undef blkcnt_t ++#undef crypt ++#undef encrypt +--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c ++++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c +@@ -18,6 +18,8 @@ + * for more details. + */ + ++#include ++ + #include + #include + #include +--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c ++++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c +@@ -37,6 +37,8 @@ + * THE SOFTWARE. + */ + ++#include "musl.h" ++ + #include + #include + #include +--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.c ++++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.c +@@ -15,6 +15,8 @@ + * for more details. + */ + ++#include "musl.h" ++ + #include + #include + #include