pkgsrc/net/latd/patches/patch-ab
shattered 10e8e43f34 Update to 1.21. Changes:
- Fix memory leak caused by latcp -d & llogin -d
- Loads of protocol fixes and speed enhancements
  NOTE: There are known problems with DECserver 90L terminal servers
- Add better support for DS90L servers reverse LAT
- Fix REQID message in moprc so it works with more servers.
2013-10-08 19:46:15 +00:00

42 lines
1.1 KiB
Text

$NetBSD: patch-ab,v 1.4 2013/10/08 19:46:15 shattered Exp $
--- interfaces-bpf.cc.orig 2003-03-17 09:32:30.000000000 +0000
+++ interfaces-bpf.cc
@@ -15,17 +15,19 @@
GNU General Public License for more details.
******************************************************************************/
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
+#include <assert.h>
#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <syslog.h>
+#include <unistd.h>
#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/types.h>
#include <sys/uio.h>
-#include <assert.h>
#include <net/if.h>
#include <net/bpf.h>
@@ -384,7 +386,11 @@ int BPFInterfaces::send_packet(int ifn,
/* write this packet: */
iov[0].iov_base = (char* )&ether_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");