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
This commit is contained in:
parent
7a324cfcd6
commit
14c82477bf
|
@ -54,6 +54,10 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_GETOPT_H
|
||||||
|
#include <getopt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ARPA_INET_H
|
#ifdef HAVE_ARPA_INET_H
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -4466,7 +4470,7 @@ main(int argc, char *argv[])
|
||||||
global_capture_opts.capture_child = capture_child;
|
global_capture_opts.capture_child = capture_child;
|
||||||
|
|
||||||
/* Now get our args */
|
/* Now get our args */
|
||||||
while ((opt = getopt(argc, argv, OPTSTRING)) != -1) {
|
while ((opt = getopt_long(argc, argv, OPTSTRING, NULL, NULL)) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'h': /* Print help and exit */
|
case 'h': /* Print help and exit */
|
||||||
print_usage(TRUE);
|
print_usage(TRUE);
|
||||||
|
|
Loading…
Reference in New Issue