strongswan: fix musl builds, reenable lost modules
Signed-off-by: Steven Barth <steven@midlink.org>
This commit is contained in:
parent
725b31909b
commit
52b28091fd
2 changed files with 78 additions and 2 deletions
|
@ -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))
|
||||
|
|
73
net/strongswan/patches/101-musl-fixes.patch
Normal file
73
net/strongswan/patches/101-musl-fixes.patch
Normal file
|
@ -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 <sys/types.h>
|
||||
+
|
||||
+#define crypt x_crypt
|
||||
+#define encrypt x_encrypt
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+#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 <linux/types.h>
|
||||
+
|
||||
+#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 <musl.h>
|
||||
+
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdint.h>
|
||||
--- 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 <sys/socket.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <linux/netlink.h>
|
||||
--- 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 <sys/socket.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
Loading…
Reference in a new issue