1
0

101-musl-fixes.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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,38 @@
  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. +
  33. +#include <linux/types.h>
  34. +
  35. +#undef fd_set
  36. +#undef ino_t
  37. +#undef off_t
  38. +#undef dev_t
  39. +#undef mode_t
  40. +#undef uid_t
  41. +#undef gid_t
  42. +#undef uint64_t
  43. +#undef u_int64_t
  44. +#undef int64_t
  45. +#undef nlink_t
  46. +#undef timer_t
  47. +#undef blkcnt_t
  48. +#undef crypt
  49. +#undef encrypt
  50. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
  51. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
  52. @@ -19,6 +19,7 @@
  53. */
  54. #define _GNU_SOURCE
  55. +#include <musl.h>
  56. #include <sys/types.h>
  57. #include <sys/socket.h>
  58. #include <stdint.h>
  59. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
  60. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
  61. @@ -37,6 +37,8 @@
  62. * THE SOFTWARE.
  63. */
  64. +#include "musl.h"
  65. +
  66. #include <sys/socket.h>
  67. #include <sys/utsname.h>
  68. #include <linux/netlink.h>
  69. --- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
  70. +++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c
  71. @@ -15,6 +15,8 @@
  72. * for more details.
  73. */
  74. +#include "musl.h"
  75. +
  76. #include <sys/socket.h>
  77. #include <linux/netlink.h>
  78. #include <linux/rtnetlink.h>