only expose struct tcphdr under _GNU_SOURCE
the BSD and GNU versions of this structure differ, so exposing it in the default _BSD_SOURCE profile is possibly problematic. both versions could be simultaneously supported with anonymous unions if needed in the future, but for now, just omitting it except under _GNU_SOURCE should be safe.
This commit is contained in:
parent
09b2995bcb
commit
da19f88659
1 changed files with 3 additions and 1 deletions
|
|
@ -31,8 +31,10 @@
|
||||||
#define SOL_TCP 6
|
#define SOL_TCP 6
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <endian.h>
|
#endif
|
||||||
|
|
||||||
|
#ifdef _GNU_SOURCE
|
||||||
|
#include <endian.h>
|
||||||
struct tcphdr
|
struct tcphdr
|
||||||
{
|
{
|
||||||
u_int16_t source;
|
u_int16_t source;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue