From: Willy Tarreau Date: Tue, 29 Sep 2015 16:19:32 +0000 (+0200) Subject: BUILD: tcp: use IPPROTO_IP when SOL_IP is not available X-Git-Tag: v1.6-dev7~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae459f3b9f9810d18aaa090264398dee2d4de23b;p=thirdparty%2Fhaproxy.git BUILD: tcp: use IPPROTO_IP when SOL_IP is not available Dmitry Sivachenko reported a build failure on FreeBSD due to SOL_IP not being defined. IPPROTO_IP must be used there instead. --- diff --git a/include/common/compat.h b/include/common/compat.h index 07dd01d8c1..b2e16af7f0 100644 --- a/include/common/compat.h +++ b/include/common/compat.h @@ -129,6 +129,11 @@ #endif #endif +/* FreeBSD doesn't define SOL_IP and prefers IPPROTO_IP */ +#ifndef SOL_IP +#define SOL_IP IPPROTO_IP +#endif + /* If IPv6 is supported, define IN6_IS_ADDR_V4MAPPED() if missing. */ #if defined(IPV6_TCLASS) && !defined(IN6_IS_ADDR_V4MAPPED) #define IN6_IS_ADDR_V4MAPPED(a) \