Skip to content
Permalink
Browse files

fix redefinition of struct tcphdr

  • Loading branch information...
rofl0r committed Jun 3, 2014
1 parent 327f57c commit 050805249776a09cfeeb0a43c2b9634e3e8904a5
Showing with 9 additions and 0 deletions.
  1. +6 −0 generic/include/linux/libc-compat.h
  2. +3 −0 generic/include/linux/tcp.h
@@ -56,6 +56,12 @@
#define __UAPI_DEF_ETHHDR 1
#endif

#ifdef _NETINET_TCP_H /* musl */
#define __UAPI_DEF_TCPHDR 0
#else
#define __UAPI_DEF_TCPHDR 1
#endif

/* Coordinate with libc netinet/in.h header. */
#if defined(_NETINET_IN_H)

@@ -18,9 +18,11 @@
#define _LINUX_TCP_H

#include <linux/types.h>
#include <linux/libc-compat.h>
#include <asm/byteorder.h>
#include <linux/socket.h>

#if __UAPI_DEF_TCPHDR
struct tcphdr {
__be16 source;
__be16 dest;
@@ -55,6 +57,7 @@ struct tcphdr {
__sum16 check;
__be16 urg_ptr;
};
#endif

/*
* The union cast uses a gcc extension to avoid aliasing problems

0 comments on commit 0508052

Please sign in to comment.
You can’t perform that action at this time.