aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2014-06-18 08:51:15 +0200
committerJörg Mayer <jmayer@loplof.de>2014-06-18 06:54:52 +0000
commit544066530b08f616fcdc7f16fe546acfa5a766a9 (patch)
tree8180adcacac1b2cec412d930f0a093d034c76180
parent666127f5f9768d33095152047234ae2ebfcea9f5 (diff)
Fix building uiqt on Windows with the cmake build system:
Protecting HAVE_PCAP_CREATE was not enough for the moc run in qt, maybe it doesn't have _WIN32 set? Don't even try to detect this function on WIN32 for now. Change-Id: I0d8a8b5b110cec164f86fe11f26a7add558eee1b Reviewed-on: https://code.wireshark.org/review/2370 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
-rw-r--r--cmake/modules/FindPCAP.cmake6
-rw-r--r--cmakeconfig.h.in4
2 files changed, 5 insertions, 5 deletions
diff --git a/cmake/modules/FindPCAP.cmake b/cmake/modules/FindPCAP.cmake
index d468a26bf1..e5a0264e2b 100644
--- a/cmake/modules/FindPCAP.cmake
+++ b/cmake/modules/FindPCAP.cmake
@@ -55,7 +55,11 @@ check_function_exists( "pcap_freecode" HAVE_PCAP_FREECODE )
# update libpcap without updating the headers.
#
check_function_exists( "pcap_breakloop" HAVE_PCAP_BREAKLOOP )
-check_function_exists( "pcap_create" HAVE_PCAP_CREATE )
+/* FIXME: The code (at least) in dumpcap assumes that PCAP_CREATE is not
+ * available on Windows */
+if( NOT WIN32 )
+ check_function_exists( "pcap_create" HAVE_PCAP_CREATE )
+endif()
check_function_exists( "pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL )
check_function_exists( "pcap_datalink_val_to_description" HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION )
check_function_exists( "pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME )
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index 41321b94db..6454b2dffa 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -180,12 +180,8 @@
/* Define if pcap_breakloop is known */
#cmakedefine HAVE_PCAP_BREAKLOOP 1
-/* FIXME: The code (at least) in dumpcap assumes that PCAP_CREATE is not
- * available on Windows - but we detect it in winpcap */
-#ifndef _WIN32
/* Define to 1 if you have the `pcap_create' function. */
#cmakedefine HAVE_PCAP_CREATE 1
-#endif
/* Define to 1 if you have the `pcap_datalink_name_to_val' function. */
#cmakedefine HAVE_PCAP_DATALINK_NAME_TO_VAL 1