1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00
Files
nmap/libpcap/NMAP_MODIFICATIONS/pre-configure.patch
david 1eba012356 Rearrange libpcap patch files for AIX compatibility.
The patch that moves "config.h" to the top of scanner.l (and hence
scanner.c) has to happen before the files are pregenerated, otherwise
there is an error on AIX:

In file included from scanner.c:2792:
/usr/include/unistd.h:171: error: conflicting types for 'lseek64'
/usr/include/unistd.h:169: error: previous declaration of 'lseek64' was here
2012-04-13 15:50:15 +00:00

27 lines
578 B
Diff

diff --git scanner.l scanner.l
index 064e9c8..93d7b97 100644
--- scanner.l
+++ scanner.l
@@ -1,3 +1,10 @@
+%top{
+/* Must come first for _LARGE_FILE_API on AIX. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+}
+
%{
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -25,10 +32,6 @@ static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.112 2008-02-06 10:21:30 guy Exp $ (LBL)";
#endif
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#ifdef WIN32
#include <pcap-stdinc.h>
#else /* WIN32 */