Skip to content

Commit b779eda

Browse files
committed
Include diag-control.h only where necessary.
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.
1 parent 9b97f85 commit b779eda

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

addrtoname.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@
7575
#endif /* what declares ether_ntohost() */
7676

7777
#ifdef NEED_NETINET_IF_ETHER_H
78-
/*
79-
* Include diag-control.h before <net/if.h>, which too defines a macro
80-
* named ND_UNREACHABLE.
81-
*/
82-
#include "diag-control.h"
8378
#include <net/if.h> /* Needed on some platforms */
8479
#include <netinet/in.h> /* Needed on some platforms */
8580
#include <netinet/if_ether.h>

extract.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
*/
3838
#include "funcattrs.h"
3939
#include "netdissect.h"
40-
#include "diag-control.h"
4140

4241
/*
4342
* If we have versions of GCC or Clang that support an __attribute__

netdissect.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
#include <smi.h>
3535
#endif
3636

37+
#ifdef _AIX
38+
#include "diag-control.h"
39+
#endif /* _AIX */
40+
3741
/*
3842
* Initialize anything that must be initialized before dissecting
3943
* packets.

netdissect.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <time.h>
3434
#include "status-exit-codes.h"
3535
#include "funcattrs.h" /* for PRINTFLIKE_FUNCPTR() */
36-
#include "diag-control.h" /* for ND_UNREACHABLE */
3736

3837
/*
3938
* Data types corresponding to multi-byte integral values within data

print-sll.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
#include <config.h>
2525

2626
#ifdef HAVE_NET_IF_H
27-
/*
28-
* Include diag-control.h before <net/if.h>, which too defines a macro
29-
* named ND_UNREACHABLE.
30-
*/
31-
#include "diag-control.h"
3227
#include <net/if.h>
3328
#endif
3429

0 commit comments

Comments
 (0)