Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
[obnox/wireshark/wip.git] / randpkt.c
index 2d92d95ea688b3700f9a8957e91b6b8b8a018017..a018265112fb07fd37cef50a3fa09e9d38ff1146 100644 (file)
--- a/randpkt.c
+++ b/randpkt.c
 #include "config.h"
 #endif
 
-#ifdef NEED_GETOPT_H
-#include "getopt.h"
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#else
+#include "wsgetopt.h"
 #endif
 
 #ifdef HAVE_UNISTD_H
@@ -500,9 +502,6 @@ main(int argc, char **argv)
        guint8                  buffer[65536];
 
        int                     opt;
-       extern char             *optarg;
-       extern int              optind;
-
        int                     produce_count = 1000; /* number of pkts to produce */
        int                     produce_type = PKT_ETHERNET;
        char                    *produce_filename = NULL;