pkgsrc/net/hping/patches/patch-ad
obache dca4ca3df8 * detection of endian in bytesex.h is not enough, use result of byteorder.h.
* replace hard coded user and mode for hping-suid option with SPECIAL_PERMS.
* replace remaining of hard coded "man" with ${PKGMANDIR}.
* add DESTDIR support.
* merge patch-a{e,g}, both for same file.
* patch to replace __sun__ with __sun for portability, pkglint(1) said.
* also regen other patches with mkpatches(1).
2009-02-11 08:06:17 +00:00

25 lines
753 B
Text

$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 ...)");