33 lines
935 B
Text
33 lines
935 B
Text
$NetBSD: patch-ab,v 1.3 2011/11/25 22:14:17 joerg Exp $
|
|
|
|
--- interfaces-bpf.cc.orig 2003-03-17 09:32:30.000000000 +0000
|
|
+++ interfaces-bpf.cc
|
|
@@ -15,6 +15,7 @@
|
|
GNU General Public License for more details.
|
|
******************************************************************************/
|
|
|
|
+#include <assert.h>
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <fcntl.h>
|
|
@@ -25,6 +26,8 @@
|
|
#include <sys/time.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/uio.h>
|
|
+#include <stdlib.h>
|
|
+#include <string.h>
|
|
|
|
#include <net/if.h>
|
|
#include <net/bpf.h>
|
|
@@ -383,7 +386,11 @@ int BPFInterfaces::send_packet(int ifn,
|
|
/* write this packet: */
|
|
iov[0].iov_base = (char* )ðer_packet;
|
|
iov[0].iov_len = sizeof(ether_packet);
|
|
+#if defined(__DragonFly__)
|
|
+ iov[1].iov_base = (char *)data;
|
|
+#else
|
|
iov[1].iov_base = data;
|
|
+#endif
|
|
iov[1].iov_len = len;
|
|
if (writev(_latd_bpf_fd, iov, 2) < 0) {
|
|
syslog(LOG_ERR, "writev: %m");
|