Copy over changes from cmake git HEAD.
[obnox/wireshark/wip.git] / randpkt.c
index 4b6644fa68ef2a74c9ef050306b7a5d65008bbcf..fbd77535c15b016015915f73dc5d9531ade436b7 100644 (file)
--- a/randpkt.c
+++ b/randpkt.c
@@ -30,7 +30,7 @@
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
 #endif
 
 #ifdef HAVE_UNISTD_H
 #include <glib.h>
 #include "wiretap/wtap.h"
 
+#ifdef _WIN32
+#include <wsutil/unicode-utils.h>
+#endif /* _WIN32 */
+
 #define array_length(x)        (sizeof x / sizeof x[0])
 
 /* Types of produceable packets */
@@ -502,12 +506,17 @@ main(int argc, char **argv)
        guint8                  buffer[65536];
 
        int                     opt;
+
        int                     produce_count = 1000; /* number of pkts to produce */
        int                     produce_type = PKT_ETHERNET;
        char                    *produce_filename = NULL;
        int                     produce_max_bytes = 5000;
        pkt_example             *example;
 
+#ifdef _WIN32
+       arg_list_utf_16to8(argc, argv);
+#endif /* _WIN32 */
+
        while ((opt = getopt(argc, argv, "b:c:ht:")) != -1) {
                switch (opt) {
                        case 'b':       /* max bytes */