009-musl-compat.patch 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. --- a/src/racoon/grabmyaddr.c
  2. +++ b/src/racoon/grabmyaddr.c
  3. @@ -47,7 +47,6 @@
  4. #include <net/route.h>
  5. #include <net/if.h>
  6. #include <net/if_dl.h>
  7. -#include <sys/sysctl.h>
  8. #define USE_ROUTE
  9. #endif
  10. --- a/src/racoon/pfkey.c
  11. +++ b/src/racoon/pfkey.c
  12. @@ -59,7 +59,6 @@
  13. #include <sys/param.h>
  14. #include <sys/socket.h>
  15. #include <sys/queue.h>
  16. -#include <sys/sysctl.h>
  17. #include <net/route.h>
  18. #include <net/pfkeyv2.h>
  19. --- a/src/setkey/setkey.c
  20. +++ b/src/setkey/setkey.c
  21. @@ -40,7 +40,6 @@
  22. #include <sys/socket.h>
  23. #include <sys/time.h>
  24. #include <sys/stat.h>
  25. -#include <sys/sysctl.h>
  26. #include <err.h>
  27. #include <netinet/in.h>
  28. #include <net/pfkeyv2.h>
  29. --- a/src/libipsec/ipsec_strerror.h
  30. +++ b/src/libipsec/ipsec_strerror.h
  31. @@ -34,6 +34,8 @@
  32. #ifndef _IPSEC_STRERROR_H
  33. #define _IPSEC_STRERROR_H
  34. +#include <sys/cdefs.h>
  35. +
  36. extern int __ipsec_errcode;
  37. extern void __ipsec_set_strerror __P((const char *));
  38. --- a/src/libipsec/libpfkey.h
  39. +++ b/src/libipsec/libpfkey.h
  40. @@ -34,6 +34,8 @@
  41. #ifndef _LIBPFKEY_H
  42. #define _LIBPFKEY_H
  43. +#include <sys/cdefs.h>
  44. +
  45. #ifndef KAME_LIBPFKEY_H
  46. #define KAME_LIBPFKEY_H
  47. --- a/src/racoon/backupsa.c
  48. +++ b/src/racoon/backupsa.c
  49. @@ -276,9 +276,9 @@ do { \
  50. GETNEXTNUM(sa_args.a_keylen, strtoul);
  51. GETNEXTNUM(sa_args.flags, strtoul);
  52. GETNEXTNUM(sa_args.l_alloc, strtoul);
  53. - GETNEXTNUM(sa_args.l_bytes, strtouq);
  54. - GETNEXTNUM(sa_args.l_addtime, strtouq);
  55. - GETNEXTNUM(sa_args.l_usetime, strtouq);
  56. + GETNEXTNUM(sa_args.l_bytes, strtoull);
  57. + GETNEXTNUM(sa_args.l_addtime, strtoull);
  58. + GETNEXTNUM(sa_args.l_usetime, strtoull);
  59. GETNEXTNUM(sa_args.seq, strtoul);
  60. #undef GETNEXTNUM
  61. --- a/src/racoon/cftoken.l
  62. +++ b/src/racoon/cftoken.l
  63. @@ -77,6 +77,10 @@
  64. #include "cfparse.h"
  65. +#ifndef GLOB_TILDE
  66. +#define GLOB_TILDE 0
  67. +#endif
  68. +
  69. int yyerrorcount = 0;
  70. #if defined(YIPS_DEBUG)
  71. --- a/src/racoon/logger.h
  72. +++ b/src/racoon/logger.h
  73. @@ -34,6 +34,8 @@
  74. #ifndef _LOGGER_H
  75. #define _LOGGER_H
  76. +#include <sys/cdefs.h>
  77. +
  78. struct log {
  79. int head;
  80. int siz;
  81. --- a/src/racoon/misc.h
  82. +++ b/src/racoon/misc.h
  83. @@ -34,6 +34,8 @@
  84. #ifndef _MISC_H
  85. #define _MISC_H
  86. +#include <sys/cdefs.h>
  87. +
  88. #define BIT2STR(b) bit2str(b, sizeof(b)<<3)
  89. #ifdef HAVE_FUNC_MACRO
  90. --- a/src/racoon/missing/crypto/sha2/sha2.h
  91. +++ b/src/racoon/missing/crypto/sha2/sha2.h
  92. @@ -40,6 +40,8 @@
  93. #ifndef __SHA2_H__
  94. #define __SHA2_H__
  95. +#include <sys/cdefs.h>
  96. +
  97. #ifdef __cplusplus
  98. extern "C" {
  99. #endif
  100. --- a/src/racoon/netdb_dnssec.h
  101. +++ b/src/racoon/netdb_dnssec.h
  102. @@ -34,6 +34,8 @@
  103. #ifndef _NETDB_DNSSEC_H
  104. #define _NETDB_DNSSEC_H
  105. +#include <sys/cdefs.h>
  106. +
  107. #ifndef T_CERT
  108. #define T_CERT 37 /* defined by RFC2538 section 2 */
  109. #endif
  110. --- a/src/racoon/plog.h
  111. +++ b/src/racoon/plog.h
  112. @@ -34,6 +34,8 @@
  113. #ifndef _PLOG_H
  114. #define _PLOG_H
  115. +#include <sys/cdefs.h>
  116. +
  117. #ifdef HAVE_STDARG_H
  118. #include <stdarg.h>
  119. #else
  120. --- a/src/racoon/str2val.h
  121. +++ b/src/racoon/str2val.h
  122. @@ -34,6 +34,8 @@
  123. #ifndef _STR2VAL_H
  124. #define _STR2VAL_H
  125. +#include <sys/cdefs.h>
  126. +
  127. extern caddr_t val2str __P((const char *, size_t));
  128. extern char *str2val __P((const char *, int, size_t *));
  129. --- a/src/racoon/vmbuf.h
  130. +++ b/src/racoon/vmbuf.h
  131. @@ -34,6 +34,8 @@
  132. #ifndef _VMBUF_H
  133. #define _VMBUF_H
  134. +#include <sys/cdefs.h>
  135. +
  136. /*
  137. * bp v
  138. * v v
  139. --- a/src/setkey/extern.h
  140. +++ b/src/setkey/extern.h
  141. @@ -1,6 +1,6 @@
  142. /* $NetBSD: extern.h,v 1.5 2009/03/06 11:45:03 tteras Exp $ */
  143. -
  144. +#include <sys/cdefs.h>
  145. void parse_init __P((void));
  146. int parse __P((FILE **));
  147. --- a/src/racoon/isakmp_cfg.c
  148. +++ b/src/racoon/isakmp_cfg.c
  149. @@ -1694,8 +1694,6 @@ isakmp_cfg_accounting_system(port, raddr
  150. "Accounting : '%s' logging on '%s' from %s.\n",
  151. ut.ut_name, ut.ut_line, ut.ut_host);
  152. - login(&ut);
  153. -
  154. break;
  155. case ISAKMP_CFG_LOGOUT:
  156. @@ -1703,8 +1701,6 @@ isakmp_cfg_accounting_system(port, raddr
  157. "Accounting : '%s' unlogging from '%s'.\n",
  158. usr, term);
  159. - logout(term);
  160. -
  161. break;
  162. default:
  163. plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n");