summaryrefslogtreecommitdiff
path: root/include/netinet/udp.h
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-06-22 22:20:20 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-06-22 23:47:24 +0200
commit58a5ba12bffad5916d9897c2870fc483f1db8282 (patch)
tree5a8f178deea7839831d275f968254fd9b944a4dd /include/netinet/udp.h
parentcdc93474623ced1357303ef2ac8e96b65d37615d (diff)
remove __FAVOR_BSD
Remove __FAVOR_BSD and sync with GNU C library Some issues compiling knock application fixed. Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'include/netinet/udp.h')
-rw-r--r--include/netinet/udp.h33
1 files changed, 17 insertions, 16 deletions
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