aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-08-01 20:45:59 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-08-01 20:45:59 +0000
commit7cdd97b0895262668dfee2f7ef693f92e2318f9b (patch)
tree01c84763405adf72d89b020e1913cd08d96250e5 /tshark.c
parent0cbe856098e5f20cf873c0974ae6a0b314c267f6 (diff)
use getopt_long() in tshark
svn path=/trunk/; revision=51087
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index fc6090b263..a59b77ea13 100644
--- a/tshark.c
+++ b/tshark.c
@@ -37,6 +37,10 @@
#include <unistd.h>
#endif
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+
#include <errno.h>
#ifdef HAVE_FCNTL_H
@@ -1200,7 +1204,7 @@ main(int argc, char *argv[])
output_fields = output_fields_new();
/* Now get our args */
- while ((opt = getopt(argc, argv, optstring)) != -1) {
+ while ((opt = getopt_long(argc, argv, optstring, NULL, NULL)) != -1) {
switch (opt) {
case '2': /* Perform two pass analysis */
perform_two_pass_analysis = TRUE;