]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: tcp: use IPPROTO_IP when SOL_IP is not available
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Sep 2015 16:19:32 +0000 (18:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Sep 2015 16:19:32 +0000 (18:19 +0200)
Dmitry Sivachenko reported a build failure on FreeBSD due to SOL_IP not
being defined. IPPROTO_IP must be used there instead.

include/common/compat.h

index 07dd01d8c15e50e8cd928d98a9b0491de2e0f93f..b2e16af7f01fb2b577f47b47579fc55a58c75e1f 100644 (file)
 #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) \