From Gisle Vanem:
authorGerald Combs <gerald@wireshark.org>
Tue, 2 Jan 2007 19:56:59 +0000 (19:56 -0000)
committerGerald Combs <gerald@wireshark.org>
Tue, 2 Jan 2007 19:56:59 +0000 (19:56 -0000)
Here are some patches needed to build using HAVE_AIRPCAP
on MingW:

* airpcap.h needs 'WEP_KEY_MAX_SIZE' from <epan/crypt/wep-wpadefs.h>.

* airpcap_loader.h needs <epan/crypt/airpdcap_user.h> and definition of
 'decryption_key_t'.

* epan/crypt/airpdcap_interop.h defines 'ntohs()' before <winsock2.h>
 gets included. Thus creating a parse error later on.

svn path=/trunk/; revision=20274

airpcap.h
airpcap_loader.h
epan/crypt/airpdcap_interop.h

index 13f1155cac9edbbc29b206262cfcd284d4d853ad..c533fd59ba9f8aedcbc5cfd8beb3d62cd61dc282 100644 (file)
--- a/airpcap.h
+++ b/airpcap.h
@@ -22,6 +22,8 @@
 #if !defined(AIRPCAP_H__EAE405F5_0171_9592_B3C2_C19EC426AD34__INCLUDED_)
 #define AIRPCAP_H__EAE405F5_0171_9592_B3C2_C19EC426AD34__INCLUDED_
 
+#include <epan/crypt/wep-wpadefs.h>  /* WEP_KEY_MAX_SIZE */
+
 /* This disables a VS warning for zero-sized arrays. All the compilers we support have that feature */
 #pragma warning( disable : 4200)
 
index 84766c90e3d9eee86d1cfab9223d1404e0b29984..d81132193dd3f0c79b48571a94fc4595c5030c12 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef __AIRPCAP_LOADER_H__
 #define __AIRPCAP_LOADER_H__
 
+#include <epan/crypt/airpdcap_user.h>
+
 /* Error values from "get_airpcap_interface_list()". */
 #define        CANT_GET_AIRPCAP_INTERFACE_LIST 0       /* error getting list */
 #define        NO_AIRPCAP_INTERFACES_FOUND     1       /* list is empty */
index e398bf21bfa799910edc89efa31b14010a0f9764..3c26163a5f9f5ef42d12d8bf779acb7a75e98579 100644 (file)
@@ -2,7 +2,7 @@
 #define        _AIRPDCAP_INTEROP_H
 
 /**
- * Cast data types commonly used in Windows (e.g. UINT16) to theirf
+ * Cast data types commonly used (e.g. UINT16) to their
  * GLib equivalents.
  */
 
@@ -57,7 +57,12 @@ typedef guchar       UCHAR;
 typedef        gsize   size_t;
 #endif
 
+#ifdef WIN32
+#include <winsock2.h>  /* ntohs() */
+#endif
+
 #ifndef        ntohs
+#undef     ntohs
 #define        ntohs(value)    g_ntohs(value)
 #endif