diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-08-09 21:02:10 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-08-09 21:02:10 +0000 |
commit | 2d657ad97ad3084bc6e367f8634dc494fc267587 (patch) | |
tree | acde70beaac706649ef2f54d96cfddf3a7df317b /text2pcap.c | |
parent | 0506bd7d86ead752795dea24c829e7312e4569b6 (diff) |
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :
getopt() can/should normally be found in unistd.h, so:
- When testing for getopt(), define that we HAVE_GETOPT instead of
HAVE_GETOPT_H (to avoid confusion).
- Don't attempt to include getopt.h: not all OS's have it (for example,
Solaris 9 does not).
- (All the places which need getopt already include unistd.h (if we have it).)
If this breaks things on some OS, we might need (a real) HAVE_GETOPT_H check.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38437 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/text2pcap.c b/text2pcap.c index daf1dacece..c2d5f7f532 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -125,9 +125,7 @@ #include <errno.h> #include <assert.h> -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif |