Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
[obnox/wireshark/wip.git] / dumpcap.c
index 9d981f5df359a853022bd90d81d197230081a9e8..99dd98f0d18db73a04f1d9542db00e9a3d4ebfcb 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
 #include <signal.h>
 #include <errno.h>
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef HAVE_NETDB_H
@@ -1555,7 +1557,7 @@ static void capture_loop_close_input(loop_data *ld) {
 
   /* if open, close the pcap "input file" */
   if(ld->pcap_h != NULL) {
-    g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "capture_loop_close_input: closing %p", ld->pcap_h);
+    g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "capture_loop_close_input: closing %p", (void *)ld->pcap_h);
     g_assert(!ld->from_cap_pipe);
     pcap_close(ld->pcap_h);
     ld->pcap_h = NULL;
@@ -2543,7 +2545,6 @@ int
 main(int argc, char *argv[])
 {
   int                  opt;
-  extern char         *optarg;
   gboolean             arg_error = FALSE;
 
 #ifdef _WIN32