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.

85 lines
1.8 KiB

  1. --- a/src/libstrongswan/library.h
  2. +++ b/src/libstrongswan/library.h
  3. @@ -118,6 +118,7 @@
  4. #include "utils/leak_detective.h"
  5. #include "plugins/plugin_loader.h"
  6. #include "settings/settings.h"
  7. +#include "musl.h"
  8. typedef struct library_t library_t;
  9. --- /dev/null
  10. +++ b/src/libstrongswan/musl.h
  11. @@ -0,0 +1,39 @@
  12. +#include <sys/types.h>
  13. +
  14. +#define crypt x_crypt
  15. +#define encrypt x_encrypt
  16. +#include <unistd.h>
  17. +
  18. +#define fd_set x_fd_set
  19. +#define ino_t x_ino_t
  20. +#define off_t x_off_t
  21. +#define loff_t x_loff_t
  22. +#define dev_t x_dev_t
  23. +#define mode_t x_mode_t
  24. +#define uid_t x_uid_t
  25. +#define gid_t x_gid_t
  26. +#define uint64_t x_uint64_t
  27. +#define u_int64_t x_u_int64_t
  28. +#define int64_t x_int64_t
  29. +#define nlink_t x_nlink_t
  30. +#define timer_t x_timer_t
  31. +#define blkcnt_t x_blkcnt_t
  32. +#define __kernel_nlink_t void
  33. +
  34. +#include <linux/types.h>
  35. +
  36. +#undef fd_set
  37. +#undef ino_t
  38. +#undef off_t
  39. +#undef dev_t
  40. +#undef mode_t
  41. +#undef uid_t
  42. +#undef gid_t
  43. +#undef uint64_t
  44. +#undef u_int64_t
  45. +#undef int64_t
  46. +#undef nlink_t
  47. +#undef timer_t
  48. +#undef blkcnt_t
  49. +#undef crypt
  50. +#undef encrypt
  51. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
  52. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
  53. @@ -18,6 +18,8 @@
  54. * for more details.
  55. */
  56. +#include <musl.h>
  57. +
  58. #define _GNU_SOURCE
  59. #include <sys/types.h>
  60. #include <sys/socket.h>
  61. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
  62. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
  63. @@ -37,6 +37,8 @@
  64. * THE SOFTWARE.
  65. */
  66. +#include "musl.h"
  67. +
  68. #include <sys/socket.h>
  69. #include <sys/utsname.h>
  70. #include <linux/netlink.h>
  71. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
  72. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
  73. @@ -15,6 +15,8 @@
  74. * for more details.
  75. */
  76. +#include "musl.h"
  77. +
  78. #include <sys/socket.h>
  79. #include <linux/netlink.h>
  80. #include <linux/rtnetlink.h>