]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: Fix OSX compilation errors
authorDinko Korunic <dinko.korunic@gmail.com>
Fri, 9 Sep 2016 07:41:15 +0000 (09:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 11 Sep 2016 06:04:37 +0000 (08:04 +0200)
SOL_IPV6 is not defined on OSX, breaking the compile. Also libcrypt is
not available for installation neither in Macports nor as a Brew recipe,
so we're disabling implicit dependancy.

Signed-off-by: Dinko Korunic <dinko.korunic@gmail.com>
Makefile
src/proto_tcp.c

index 4d6ab1aced87cd8972b2a9ef5e63b680757b1ea5..0ce4b325305ce53cb28e2502c360ee1594eb090d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -307,7 +307,6 @@ ifeq ($(TARGET),osx)
   USE_POLL       = implicit
   USE_KQUEUE     = implicit
   USE_TPROXY     = implicit
-  USE_LIBCRYPT   = implicit
 else
 ifeq ($(TARGET),openbsd)
   # This is for OpenBSD >= 3.0
index 9c5ea98b71fb5ed4e2541f0ce905f9ed62878d37..b614e6b5900098d938c56f8928412a0bd060a7ef 100644 (file)
@@ -205,7 +205,7 @@ int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct so
        case AF_INET6:
                if (flags && ip6_transp_working) {
                        if (0
-#if defined(IPV6_TRANSPARENT)
+#if defined(IPV6_TRANSPARENT) && defined(SOL_IPV6)
                            || (setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT, &one, sizeof(one)) == 0)
 #endif
 #if defined(IP_FREEBIND)
@@ -853,7 +853,7 @@ int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen)
                break;
                case AF_INET6:
                        if (1
-#if defined(IPV6_TRANSPARENT)
+#if defined(IPV6_TRANSPARENT) && defined(SOL_IPV6)
                            && (setsockopt(fd, SOL_IPV6, IPV6_TRANSPARENT, &one, sizeof(one)) == -1)
 #endif
 #if defined(IP_FREEBIND)