summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2002-04-07 00:43:50 +0000
committerguy <guy>2002-04-07 00:43:50 +0000
commitc5c5ce9920b9b43bd92e41140f44fa04d9a2a434 (patch)
treebe0c71013f7364d962a0db5da5cd057db9d7508c
parent532730fe84f080564f40df59e3dc7ce60f2ba789 (diff)
downloadlibpcap-c5c5ce9920b9b43bd92e41140f44fa04d9a2a434.tar.gz
Include <netdb.h> before <pcap-namedb.h>, as <netdb.h> is included to
define a structure used by <pcap-namedb.h>, and include <sys/socket.h> before <netdb.h>, as <sys/socket.h> is included to define a structure used by <netdb.h> (only a pointer to the first structure is used in <pcap-namedb.h>, and only a pointer to the second structure is used by <netdb.h>, so code will compile no matter which order you include them in, but it's a bit cleaner to include <sys/socket.h> before <netdb.h> and to include <netdb.h> before <pcap-namedb.h>). Indicate why we're including <netdb.h> and <sys/socket.h>.
-rw-r--r--scanner.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/scanner.l b/scanner.l
index b7cab499..774fac2b 100644
--- a/scanner.l
+++ b/scanner.l
@@ -22,7 +22,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.81 2001-09-14 01:40:57 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.81.2.1 2002-04-07 00:43:50 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -39,15 +39,15 @@ static const char rcsid[] =
#include "pcap-int.h"
#include "gencode.h"
-#include <pcap-namedb.h>
#ifdef INET6
-#include <netdb.h>
-#include <sys/socket.h>
+#include <sys/socket.h> /* for "struct sockaddr" in "struct addrinfo" */
+#include <netdb.h> /* for "struct addrinfo" */
/* Workaround for AIX 4.3 */
#if !defined(AI_NUMERICHOST)
#define AI_NUMERICHOST 0x04
#endif
#endif /*INET6*/
+#include <pcap-namedb.h>
#include "tokdefs.h"
#ifdef HAVE_OS_PROTO_H