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.

53 lines
1.7 KiB

  1. From 42ccea00f69abdd1bb748494f7e17d8369ccae31 Mon Sep 17 00:00:00 2001
  2. From: Dinko Korunic <dinko.korunic@gmail.com>
  3. Date: Fri, 9 Sep 2016 09:41:15 +0200
  4. Subject: [PATCH 01/26] BUG/MINOR: Fix OSX compilation errors
  5. SOL_IPV6 is not defined on OSX, breaking the compile. Also libcrypt is
  6. not available for installation neither in Macports nor as a Brew recipe,
  7. so we're disabling implicit dependancy.
  8. Signed-off-by: Dinko Korunic <dinko.korunic@gmail.com>
  9. (cherry picked from commit 7276f3aa3d687fca64bb9becc66c8e0dbb8b378a)
  10. ---
  11. Makefile | 1 -
  12. src/proto_tcp.c | 4 ++--
  13. 2 files changed, 2 insertions(+), 3 deletions(-)
  14. diff --git a/Makefile b/Makefile
  15. index 1bf778d..1d0f2bc 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -301,7 +301,6 @@ ifeq ($(TARGET),osx)
  19. USE_POLL = implicit
  20. USE_KQUEUE = implicit
  21. USE_TPROXY = implicit
  22. - USE_LIBCRYPT = implicit
  23. else
  24. ifeq ($(TARGET),openbsd)
  25. # This is for OpenBSD >= 3.0
  26. diff --git a/src/proto_tcp.c b/src/proto_tcp.c
  27. index 2c81fb4..4f5d88d 100644
  28. --- a/src/proto_tcp.c
  29. +++ b/src/proto_tcp.c
  30. @@ -206,7 +206,7 @@ int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct so
  31. case AF_INET6:
  32. if (flags && ip6_transp_working) {
  33. if (0
  34. -#if defined(IPV6_TRANSPARENT)
  35. +#if defined(IPV6_TRANSPARENT) && defined(SOL_IPV6)
  36. || (setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT, &one, sizeof(one)) == 0)
  37. #endif
  38. #if defined(IP_FREEBIND)
  39. @@ -854,7 +854,7 @@ int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen)
  40. break;
  41. case AF_INET6:
  42. if (1
  43. -#if defined(IPV6_TRANSPARENT)
  44. +#if defined(IPV6_TRANSPARENT) && defined(SOL_IPV6)
  45. && (setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT, &one, sizeof(one)) == -1)
  46. #endif
  47. #if defined(IP_FREEBIND)
  48. --
  49. 2.7.3