[mingw-wpcap] build fixes

sailer sailer at fedoraproject.org
Sun Jan 4 00:17:53 UTC 2015


commit 9b542360d38151fcf04145b573495afeab930ad0
Author: Thomas Sailer <t.sailer at alumni.ethz.ch>
Date:   Sun Jan 4 01:17:45 2015 +0100

    build fixes

 mingw-wpcap.spec                      |    2 +-
 winpcap-mingw-w64-compatibility.patch |   21 +++--------
 wpcap.patch                           |   62 +++++++++++++++++++++++++++------
 3 files changed, 57 insertions(+), 28 deletions(-)
---
diff --git a/mingw-wpcap.spec b/mingw-wpcap.spec
index ee3d3cb..ddb11f3 100644
--- a/mingw-wpcap.spec
+++ b/mingw-wpcap.spec
@@ -205,7 +205,7 @@ rm -rf $RPM_BUILD_ROOT/%{wpcapexamples}/pcap/stats
 %{mingw64_includedir}/wpcap
 
 %changelog
-* Sat Jan 04 2015 Thomas Sailer <t.sailer at alumni.ethz.ch> - 4.1.final3-1
+* Sun Jan 04 2015 Thomas Sailer <t.sailer at alumni.ethz.ch> - 4.1.final3-1
 - update to 4.1.3
 
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.1.final2-13
diff --git a/winpcap-mingw-w64-compatibility.patch b/winpcap-mingw-w64-compatibility.patch
index 038a13f..8c7d0e4 100644
--- a/winpcap-mingw-w64-compatibility.patch
+++ b/winpcap-mingw-w64-compatibility.patch
@@ -1,14 +1,3 @@
---- packetNtx/Dll/Packet32-Int.h.mingw-w64	2008-11-18 12:17:42.000000000 +0100
-+++ packetNtx/Dll/Packet32-Int.h	2010-10-13 16:28:41.871425773 +0200
-@@ -42,7 +42,7 @@
- #include "NpfImExt.h"
- #endif //HAVE_NPFIM_API
- 
--#ifdef __MINGW32__
-+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
- #include <ddk/ntddndis.h>
- #else
- #pragma warning( push )
 --- wpcap/libpcap/pcap-win32.c.orig	2010-10-13 16:42:02.372549515 +0200
 +++ wpcap/libpcap/pcap-win32.c	2010-10-13 16:43:28.138601005 +0200
 @@ -38,7 +38,7 @@
@@ -20,13 +9,13 @@
  #include <ddk/ndis.h>
  #else /*__MINGW32__*/
  #include <ntddndis.h>
---- wpcap/PRJ/GNUmakefile.mingw-w64	2011-07-12 16:49:46.000000000 +0200
-+++ wpcap/PRJ/GNUmakefile	2011-07-12 16:51:07.362061939 +0200
-@@ -32,6 +32,7 @@
+--- wpcap/PRJ/GNUmakefile.mingw-w64	2015-01-04 01:12:38.565026946 +0100
++++ wpcap/PRJ/GNUmakefile	2015-01-04 01:14:36.961893695 +0100
+@@ -35,6 +35,7 @@
  	-DHAVE_REMOTE \
  	-DHAVE_TC_API \
  	-DHAVE_ADDRINFO \
 +	-DHAVE___ATTRIBUTE__ \
+ 	-DHAVE_LIMITS_H \
+ 	-DYY_NO_UNISTD_H \
  	-mno-cygwin -shared ${OPTFLAGS}
- LDFLAGS = -Wl,--out-implib,../lib/libwpcap.a
- LIBS = -L ../../${PACKET_DIR}/Dll/Project -lPacket -lws2_32
diff --git a/wpcap.patch b/wpcap.patch
index ec8c99a..c3b7bee 100644
--- a/wpcap.patch
+++ b/wpcap.patch
@@ -9,6 +9,17 @@
  LDFLAGS = -Wl,--out-implib,libpacket.a
  OBJS = ../Packet32.o ../AdInfo.o
  LIBS = -lws2_32 -lversion
+--- ./packetNtx/Dll/Packet32-Int.h.build	2015-01-04 00:49:16.544281679 +0100
++++ ./packetNtx/Dll/Packet32-Int.h	2015-01-04 00:49:59.426220977 +0100
+@@ -43,7 +43,7 @@
+ #endif //HAVE_NPFIM_API
+ 
+ #ifdef __MINGW32__
+-#ifdef __MINGW64__
++#if defined(__MINGW64__) || defined(__MINGW64_VERSION_MAJOR)
+ #include <ntddndis.h>
+ #else /*__MINGW64__*/
+ #include <ddk/ntddndis.h>
 --- ./wpcap/libpcap/inet.c.orig	2009-02-16 19:40:53.000000000 +0100
 +++ ./wpcap/libpcap/inet.c	2009-02-16 19:41:37.000000000 +0100
 @@ -804,7 +804,7 @@
@@ -20,14 +31,43 @@
  			tAstr += strlen(tAstr) + 1;
  		}
  
---- ./wpcap/PRJ/GNUmakefile.orig	2008-12-21 04:46:22.000000000 +0100
-+++ ./wpcap/PRJ/GNUmakefile	2009-02-16 19:38:23.000000000 +0100
-@@ -67,7 +67,7 @@
- main: ${OBJS}
- 	@${RM} -rf ../lib/
- 	mkdir ../lib/
--	${CC} ${CFLAGS} ${LDFLAGS} -o wpcap.dll wpcap.def ${OBJS} ${LIBS}
-+	${CC} ${CFLAGS} ${LDFLAGS} -o wpcap.dll WPCAP.DEF ${OBJS} ${LIBS}
- 
- install:
- 	cp wpcap.dll ${INSTALL_DIR}
+--- ./wpcap/libpcap/Win32/Include/net/netdb.h.xx	2015-01-04 01:05:54.205913893 +0100
++++ ./wpcap/libpcap/Win32/Include/net/netdb.h	2015-01-04 01:06:54.381436947 +0100
+@@ -57,7 +57,7 @@
+ #ifndef _NETDB_H_
+ #define _NETDB_H_
+ 
+-#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT)
++#if 0 && (defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT))
+ #include <stdio.h>
+ #include <netinet/in.h>
+ #endif
+@@ -80,7 +80,7 @@
+ };
+ 
+ #ifndef WIN32
+-#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT)
++#if 0 && (defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT))
+ 
+ #define __NETDB_MAXALIASES	35
+ #define __NETDB_MAXADDRS	35
+@@ -122,7 +122,7 @@
+ void		setservent (int);
+ void		setrpcent (int);
+ 
+-#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT)
++#if 0 && (defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT))
+ struct hostent	*gethostbyaddr_r (const char *__addr,
+ 			int __length, int __type,
+ 			struct hostent *__result,
+--- ./wpcap/PRJ/GNUmakefile.build	2015-01-04 01:10:28.164058431 +0100
++++ ./wpcap/PRJ/GNUmakefile	2015-01-04 01:11:09.182823232 +0100
+@@ -32,7 +32,7 @@
+ 	-DSIZEOF_CHAR=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG_LONG=8 -DWPCAP -D'_U_=' \
+ 	-DHAVE_SNPRINTF -DHAVE_VSNPRINTF \
+ 	-DSIZEOF_LONG_LONG=8 \
+-	-DHAVE_REMOTE -DHAVE_AIRPCAP_API \
++	-DHAVE_REMOTE \
+ 	-DHAVE_TC_API \
+ 	-DHAVE_ADDRINFO \
+ 	-DHAVE_LIMITS_H \


More information about the scm-commits mailing list