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.

84 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. @@ -19,6 +19,7 @@
  54. */
  55. #define _GNU_SOURCE
  56. +#include <musl.h>
  57. #include <sys/types.h>
  58. #include <sys/socket.h>
  59. #include <stdint.h>
  60. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
  61. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
  62. @@ -37,6 +37,8 @@
  63. * THE SOFTWARE.
  64. */
  65. +#include "musl.h"
  66. +
  67. #include <sys/socket.h>
  68. #include <sys/utsname.h>
  69. #include <linux/netlink.h>
  70. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
  71. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
  72. @@ -15,6 +15,8 @@
  73. * for more details.
  74. */
  75. +#include "musl.h"
  76. +
  77. #include <sys/socket.h>
  78. #include <linux/netlink.h>
  79. #include <linux/rtnetlink.h>