From 2d657ad97ad3084bc6e367f8634dc494fc267587 Mon Sep 17 00:00:00 2001 From: morriss Date: Tue, 9 Aug 2011 21:02:10 +0000 Subject: 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 --- rawshark.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'rawshark.c') diff --git a/rawshark.c b/rawshark.c index df30037b89..ce0e232339 100644 --- a/rawshark.c +++ b/rawshark.c @@ -61,9 +61,7 @@ # include #endif -#ifdef HAVE_GETOPT_H -#include -#else +#ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif -- cgit v1.2.3