BUG/MINOR: Fix OSX compilation errors

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>
This commit is contained in:
Dinko Korunic 2016-09-09 09:41:15 +02:00 committed by Willy Tarreau
parent 5094656a67
commit 7276f3aa3d
2 changed files with 2 additions and 3 deletions

View File

@ -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

View 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)