diff options
Diffstat (limited to 'mergecap.c')
-rw-r--r-- | mergecap.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mergecap.c b/mergecap.c index f9a6c417eb..96856b533f 100644 --- a/mergecap.c +++ b/mergecap.c @@ -18,18 +18,23 @@ #include <errno.h> #include <glib.h> -#ifdef HAVE_GETOPT_H +/* + * If we have getopt_long() in the system library, include <getopt.h>. + * Otherwise, we're using our own getopt_long() (either because the + * system has getopt() but not getopt_long(), as with some UN*Xes, + * or because it doesn't even have getopt(), as with Windows), so + * include our getopt_long()'s header. + */ +#ifdef HAVE_GETOPT_LONG #include <getopt.h> +#else +#include <wsutil/wsgetopt.h> #endif #include <string.h> #include <wiretap/wtap.h> -#ifndef HAVE_GETOPT_LONG -#include <wsutil/wsgetopt.h> -#endif - #include <ui/clopts_common.h> #include <ui/cmdarg_err.h> #include <wsutil/filesystem.h> |