diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-09-17 03:20:05 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-09-17 03:20:05 +0000 |
commit | d0caa40dec43ac590d9424657354a32ee8b2f3df (patch) | |
tree | 94dcbc45474e57d8b3591133eb17b289389b76cc /util.c | |
parent | 7924dd26fae792ff7e4a95fe5a4ace8a1b04309f (diff) | |
download | wireshark-d0caa40dec43ac590d9424657354a32ee8b2f3df.tar.gz wireshark-d0caa40dec43ac590d9424657354a32ee8b2f3df.tar.bz2 wireshark-d0caa40dec43ac590d9424657354a32ee8b2f3df.zip |
libpcap unconditionally includes <net/if.h> on UNIX systems, as that is,
as far as I know, the only way to get IFF_UP, IFF_LOOPBACK, "struct
ifreq", and "struct ifconf" defined, and those are required in order to
get, via SIOCGIFCONF, the interface list, and to exclude interfaces that
aren't up and handle loopback interfaces differently from other
interfaces.
If we're on UNIX and have libpcap, we should do the same; that way, if
the system doesn't have <net/if.h> installed, the compile will fail with
an "I can't find <net/if.h>" error, rather than the configure indicating
that <net/if.h> can't be found, causing "util.c" not to include it,
causing it to fail with complaints about IFF_UP, IFF_LOOPBACK, and
various structures not being defined - the former tells you the root
cause, the latter doesn't.
svn path=/trunk/; revision=2442
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* util.c * Utility routines * - * $Id: util.c,v 1.44 2000/09/10 06:44:38 guy Exp $ + * $Id: util.c,v 1.45 2000/09/17 03:20:05 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -75,7 +75,7 @@ typedef int mode_t; /* for win32 */ #include <sys/ioctl.h> #endif -#ifdef HAVE_NET_IF_H +#ifndef WIN32 #include <net/if.h> #endif |