summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2002-04-07 00:05:12 +0000
committerguy <guy>2002-04-07 00:05:12 +0000
commitfed688ab1cc052b924699fe8175422f8214e197b (patch)
treec56ca7608623e43cf1c5d406c92cac17e359ecbc
parent612a1256f3e82f53051a94e96263f89d887e3850 (diff)
downloadlibpcap-fed688ab1cc052b924699fe8175422f8214e197b.tar.gz
Include <netdb.h> before <pcap-namedb.h>, as <netdb.h> is included to
define a structure used by <pcap-namedb.h> (only a pointer to the structure is used in <pcap-namedb.h>, so code will compile no matter which order you include them in, but it's a bit cleaner to include <netdb.h> first). Indicate why we're including <netdb.h>.
-rw-r--r--gencode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gencode.c b/gencode.c
index ecd7dbe2..d5d37ecc 100644
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.160.2.1 2002-04-06 23:58:24 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.160.2.2 2002-04-07 00:05:12 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -56,10 +56,10 @@ struct rtentry;
#include "ppp.h"
#include "sll.h"
#include "arcnet.h"
-#include <pcap-namedb.h>
#ifdef INET6
-#include <netdb.h>
+#include <netdb.h> /* for "struct addrinfo" */
#endif /*INET6*/
+#include <pcap-namedb.h>
#define ETHERMTU 1500