Commit
c61431cb5f54c2a43d05bb0067f5c5199bf2744a
by Oliver Smithsrc/l2tp_protocol.h: include netinet/in.h
Fix the following error seen in the master-osmo-el2tpd jenkins job after
switching it to debian 13:
In file included from l2tpd_lapd.c:31:
l2tp_protocol.h:28:25: error: expected identifier before numeric constant
28 | #define IPPROTO_L2TP 115
This happens, because /usr/include/netinet/in.h has:
/* Standard well-defined IP protocols. */
enum
{
IPPROTO_IP = 0, /* Dummy protocol for TCP. */
#define IPPROTO_IP IPPROTO_IP
IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */
#define IPPROTO_ICMP IPPROTO_ICMP
…
IPPROTO_COMP = 108, /* Compression Header Protocol. */
#define IPPROTO_COMP IPPROTO_COMP
IPPROTO_L2TP = 115, /* Layer 2 Tunnelling Protocol. */
#define IPPROTO_L2TP IPPROTO_L2TP
…
};
Which then becomes (seen with gcc -E):
IPPROTO_COMP = 108,
# 84 "/usr/include/netinet/in.h"
115
# 84 "/usr/include/netinet/in.h" 3 4
= 115,
IPPROTO_SCTP = 132,
Fix this by including netinet/in.h first, so it won't be redefined if it
is already there.
Change-Id: Iaec15ee59a1e740d41e616142637612d2aacf1dc