You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 lines
2.1 KiB

--- 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,38 @@
+#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 mode_t x_mode_t
+#define uid_t x_uid_t
+#define gid_t x_gid_t
+#define uint64_t x_uint64_t
+#define u_int64_t x_u_int64_t
+#define int64_t x_int64_t
+#define nlink_t x_nlink_t
+#define timer_t x_timer_t
+#define blkcnt_t x_blkcnt_t
+
+#include <linux/types.h>
+
+#undef fd_set
+#undef ino_t
+#undef off_t
+#undef dev_t
+#undef mode_t
+#undef uid_t
+#undef gid_t
+#undef uint64_t
+#undef u_int64_t
+#undef int64_t
+#undef nlink_t
+#undef timer_t
+#undef blkcnt_t
+#undef crypt
+#undef encrypt
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
@@ -40,6 +40,7 @@
*/
#define _GNU_SOURCE
+#include <musl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
--- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
+++ b/src/libcharon/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/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
@@ -39,6 +39,8 @@
* THE SOFTWARE.
*/
+#include "musl.h"
+
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
--- a/src/libstrongswan/plugins/bliss/bliss_huffman.c
+++ b/src/libstrongswan/plugins/bliss/bliss_huffman.c
@@ -17,6 +17,8 @@
#include "bliss_param_set.h"
#include <library.h>
+#undef fprintf
+#undef printf
#include <stdio.h>
#include <math.h>