aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-07-24 20:42:39 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-07-24 20:42:39 +0000
commit14c82477bf3821736f5551c4d911b8fa4b2e3379 (patch)
tree8bb6853cc8dbbcf49d3d05354bb84ebd36742312 /dumpcap.c
parent7a324cfcd6c57738db83f78c5a9b0e3797e7cbb5 (diff)
use getopt_long() in dumpcap
for now, there's no long options, this is just a first test to see if things compile everywhere... svn path=/trunk/; revision=50877
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dumpcap.c b/dumpcap.c
index a00fa62b52..c203f3154e 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -54,6 +54,10 @@
#include <unistd.h>
#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
@@ -4466,7 +4470,7 @@ main(int argc, char *argv[])
global_capture_opts.capture_child = capture_child;
/* Now get our args */
- while ((opt = getopt(argc, argv, OPTSTRING)) != -1) {
+ while ((opt = getopt_long(argc, argv, OPTSTRING, NULL, NULL)) != -1) {
switch (opt) {
case 'h': /* Print help and exit */
print_usage(TRUE);