mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUILD: tcp: define SOL_TCP when only IPPROTO_TCP exists
FreeBSD prefers to use IPPROTO_TCP over SOL_TCP, just like it does with their *_IP counterparts. It's worth noting that there are a few inconsistencies between SOL_TCP and IPPROTO_TCP in the code, eg on TCP_QUICKACK. The two values are the same but it's worth applying what implementations recommend. No backport is needed, this was uncovered by the recent tcp_info stuff.
This commit is contained in:
parent
64345aaaf0
commit
9d87ca0685
@ -29,6 +29,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
|
||||||
#ifndef BITS_PER_INT
|
#ifndef BITS_PER_INT
|
||||||
#define BITS_PER_INT (8*sizeof(int))
|
#define BITS_PER_INT (8*sizeof(int))
|
||||||
@ -134,6 +135,11 @@
|
|||||||
#define SOL_IP IPPROTO_IP
|
#define SOL_IP IPPROTO_IP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* same for SOL_TCP */
|
||||||
|
#ifndef SOL_TCP
|
||||||
|
#define SOL_TCP IPPROTO_TCP
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If IPv6 is supported, define IN6_IS_ADDR_V4MAPPED() if missing. */
|
/* If IPv6 is supported, define IN6_IS_ADDR_V4MAPPED() if missing. */
|
||||||
#if defined(IPV6_TCLASS) && !defined(IN6_IS_ADDR_V4MAPPED)
|
#if defined(IPV6_TCLASS) && !defined(IN6_IS_ADDR_V4MAPPED)
|
||||||
#define IN6_IS_ADDR_V4MAPPED(a) \
|
#define IN6_IS_ADDR_V4MAPPED(a) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user