diff options
author | fjoe <fjoe@FreeBSD.org> | 2006-11-14 02:40:40 +0800 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2006-11-14 02:40:40 +0800 |
commit | 2a2b19eb6bca48a2a96ca8510a5341e1ccdc0095 (patch) | |
tree | d5c811ce1aefd4bc6c3538ca30fd738e8f09dd7d /emulators/dynamips-devel | |
parent | c5595d11acb160d63bf5c72be9ad22d1137a9f6f (diff) | |
download | freebsd-ports-gnome-2a2b19eb6bca48a2a96ca8510a5341e1ccdc0095.tar.gz freebsd-ports-gnome-2a2b19eb6bca48a2a96ca8510a5341e1ccdc0095.tar.zst freebsd-ports-gnome-2a2b19eb6bca48a2a96ca8510a5341e1ccdc0095.zip |
Define PCAP_D_IN as D_IN on FreeBSD < 6.2 or HEAD before pcap 0.9.4 import.
PR: 105468
Diffstat (limited to 'emulators/dynamips-devel')
-rw-r--r-- | emulators/dynamips-devel/files/patch-gen_eth.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/emulators/dynamips-devel/files/patch-gen_eth.c b/emulators/dynamips-devel/files/patch-gen_eth.c index 20f469d03d59..f27a0f8f709c 100644 --- a/emulators/dynamips-devel/files/patch-gen_eth.c +++ b/emulators/dynamips-devel/files/patch-gen_eth.c @@ -1,11 +1,16 @@ ---- gen_eth.c.orig Wed Oct 18 22:39:46 2006 -+++ gen_eth.c Wed Oct 18 22:39:55 2006 -@@ -46,7 +46,7 @@ - goto pcap_error; +--- gen_eth.c.orig Thu Sep 14 17:59:13 2006 ++++ gen_eth.c Tue Nov 14 00:28:18 2006 +@@ -25,6 +25,13 @@ + #include <netinet/in.h> + #include <arpa/inet.h> + #include <pthread.h> ++#ifdef __FreeBSD__ ++#include <osreldate.h> ++ ++#if __FreeBSD_version < 602100 || __FreeBSD_version < 700021 ++#define PCAP_D_IN D_IN ++#endif ++#endif - /* Accept only incoming packets */ -- pcap_setdirection(p,PCAP_D_IN); -+ pcap_setdirection(p,D_IN); - #else - p = pcap_open(device,2048, - PCAP_OPENFLAG_PROMISCUOUS | + #ifdef CYGWIN + /* Needed for pcap_open() flags */ |