Skip to content

Commit

Permalink
stress-raw[pkg|udp]: only include linux/udp.h if netinet/udp.h does n…
Browse files Browse the repository at this point in the history
…ot exist

Signed-off-by: Colin Ian King <[email protected]>
  • Loading branch information
ColinIanKing committed Dec 11, 2023
1 parent b40b7ce commit 3040a07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions stress-rawpkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
#include <linux/sockios.h>
#endif

#if defined(HAVE_LINUX_UDP_H)
#include <linux/udp.h>
#endif

#if defined(HAVE_NET_IF_H)
#include <net/if.h>
#endif
Expand All @@ -50,6 +46,8 @@

#if defined(HAVE_NETINET_UDP_H)
#include <netinet/udp.h>
#elif defined(HAVE_LINUX_UDP_H)
#include <linux/udp.h>
#endif

#include <arpa/inet.h>
Expand Down
6 changes: 2 additions & 4 deletions stress-rawudp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@
#include "core-killpid.h"
#include "core-net.h"

#if defined(HAVE_LINUX_UDP_H)
#include <linux/udp.h>
#endif

#if defined(HAVE_NETINET_IP_H)
#include <netinet/ip.h>
#endif

#if defined(HAVE_NETINET_UDP_H)
#include <netinet/udp.h>
#elif defined(HAVE_LINUX_UDP_H)
#include <linux/udp.h>
#endif

#include <arpa/inet.h>
Expand Down

0 comments on commit 3040a07

Please sign in to comment.