From 58a5ba12bffad5916d9897c2870fc483f1db8282 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 22 Jun 2017 22:20:20 +0200 Subject: remove __FAVOR_BSD Remove __FAVOR_BSD and sync with GNU C library Some issues compiling knock application fixed. Reported-By: Thomas Petazzoni --- include/netinet/udp.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'include/netinet/udp.h') diff --git a/include/netinet/udp.h b/include/netinet/udp.h index 7d4976885..ac6f23413 100644 --- a/include/netinet/udp.h +++ b/include/netinet/udp.h @@ -52,27 +52,28 @@ /* UDP header as specified by RFC 768, August 1980. */ -#ifdef __FAVOR_BSD struct udphdr { - u_int16_t uh_sport; /* source port */ - u_int16_t uh_dport; /* destination port */ - u_int16_t uh_ulen; /* udp length */ - u_int16_t uh_sum; /* udp checksum */ + __extension__ union + { + struct + { + uint16_t uh_sport; /* source port */ + uint16_t uh_dport; /* destination port */ + uint16_t uh_ulen; /* udp length */ + uint16_t uh_sum; /* udp checksum */ + }; + struct + { + uint16_t source; + uint16_t dest; + uint16_t len; + uint16_t check; + }; + }; }; -#else - -struct udphdr -{ - u_int16_t source; - u_int16_t dest; - u_int16_t len; - u_int16_t check; -}; -#endif - /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments. */ #define UDP_ENCAP 100 /* Set the socket to accept -- cgit v1.2.3