summaryrefslogtreecommitdiff
path: root/net/hping/patches/patch-ad
blob: 919c88f484e99381ca087735fded04b095f25612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-ad,v 1.4 2009/02/11 08:06:17 obache Exp $

--- libpcap_stuff.c.orig	2002-12-13 14:07:07.000000000 +0000
+++ libpcap_stuff.c
@@ -16,8 +16,10 @@
 #include <string.h>
 #include <stdlib.h>
 #include <sys/ioctl.h>
-#include <pcap.h>
+#include <sys/time.h>
 #include <net/bpf.h>
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
+#include <pcap.h>
 
 #include "globals.h"
 
@@ -35,7 +37,7 @@ int open_pcap()
 		printf("[open_pcap] pcap_open_live: %s\n", errbuf);
 		return -1;
 	}
-#if (!defined OSTYPE_LINUX) && (!defined __sun__)
+#if (!defined OSTYPE_LINUX) && (!defined __sun)
 	/* Return the packets to userspace as fast as possible */
 	if (ioctl(pcap_fileno(pcapfp), BIOCIMMEDIATE, &on) == -1)
 		perror("[open_pcap] ioctl(... BIOCIMMEDIATE ...)");