]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Include diag-control.h only where necessary.
authorDenis Ovsienko <[email protected]>
Mon, 1 Apr 2024 11:58:17 +0000 (12:58 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 2 Apr 2024 10:36:13 +0000 (11:36 +0100)
Neither addrtoname.c nor extract.h nor netdissect.h nor print-sll.c
require the header anymore, so do not include it there.  Add a missing
conditional include to netdissect.c.

addrtoname.c
extract.h
netdissect.c
netdissect.h
print-sll.c

index 2a66b50e7d87b7e378036bb3404bc1b9f2ce333b..48fac28696d7be8368b785d9316764e80b64991a 100644 (file)
   #endif /* what declares ether_ntohost() */
 
   #ifdef NEED_NETINET_IF_ETHER_H
-    /*
-     * Include diag-control.h before <net/if.h>, which too defines a macro
-     * named ND_UNREACHABLE.
-     */
-    #include "diag-control.h"
     #include <net/if.h>                /* Needed on some platforms */
     #include <netinet/in.h>    /* Needed on some platforms */
     #include <netinet/if_ether.h>
index fb80fdee26a9b042671a9524815f635b2bdab069..7ec40e6372fab42dcd78151d0487f3633b33a518 100644 (file)
--- a/extract.h
+++ b/extract.h
@@ -37,7 +37,6 @@
  */
 #include "funcattrs.h"
 #include "netdissect.h"
-#include "diag-control.h"
 
 /*
  * If we have versions of GCC or Clang that support an __attribute__
index e78ccbc72b529328c0252886d66e94990b9cf61b..a377a4828d4c1df8f32fee9a1e88b28750ee079c 100644 (file)
 #include <smi.h>
 #endif
 
+#ifdef _AIX
+#include "diag-control.h"
+#endif /* _AIX */
+
 /*
  * Initialize anything that must be initialized before dissecting
  * packets.
index 283e5aa5a75a99442885562d70154e445cdd273c..990cb145c42ba3e614dc316203f6039865569e09 100644 (file)
@@ -33,7 +33,6 @@
 #include <time.h>
 #include "status-exit-codes.h"
 #include "funcattrs.h" /* for PRINTFLIKE_FUNCPTR() */
-#include "diag-control.h" /* for ND_UNREACHABLE */
 
 /*
  * Data types corresponding to multi-byte integral values within data
index 8292388bb10494c3e9928e6d1d0700d2b9120094..3a760aef0a02d5c4d7911390ecd5258cbdcc458f 100644 (file)
 #include <config.h>
 
 #ifdef HAVE_NET_IF_H
-/*
- * Include diag-control.h before <net/if.h>, which too defines a macro
- * named ND_UNREACHABLE.
- */
-#include "diag-control.h"
 #include <net/if.h>
 #endif