FreeBSD patch from Frederic Perrin <frederic.perrin@resel.fr> plus fix for

compile error in gethostbyaddr resolver.
Order of pcap.h vs bpf.h switched, to fix compilation on Mac OS X.
This commit is contained in:
pdw
2011-10-02 21:41:47 +00:00
parent 3e90c6b547
commit 120a1b2c53
3 changed files with 42 additions and 27 deletions

14
iftop.c
View File

@@ -5,13 +5,6 @@
#include "integers.h"
#if defined(HAVE_PCAP_H)
# include <pcap.h>
#elif defined(HAVE_PCAP_PCAP_H)
# include <pcap/pcap.h>
#else
# error No pcap.h
#endif
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@@ -20,6 +13,13 @@
#include <sys/socket.h>
#include <net/if.h>
#include <net/bpf.h>
#if defined(HAVE_PCAP_H)
# include <pcap.h>
#elif defined(HAVE_PCAP_PCAP_H)
# include <pcap/pcap.h>
#else
# error No pcap.h
#endif
#include <pthread.h>
#include <curses.h>