openbsd-ports/net/dnsmasq/patches/patch-src_bpf_c

18 lines
629 B
Plaintext

$OpenBSD: patch-src_bpf_c,v 1.1 2011/03/06 11:19:53 sthen Exp $
--- src/bpf.c.orig Wed Mar 2 17:42:32 2011
+++ src/bpf.c Wed Mar 2 17:42:43 2011
@@ -35,6 +35,13 @@ static struct iovec ifreq = {
#include <net/if_dl.h>
#include <netinet/if_ether.h>
+#ifndef SA_SIZE
+#define SA_SIZE(sa) \
+ ( (!(sa) || ((struct sockaddr *)(sa))->sa_len == 0) ? \
+ sizeof(long) : \
+ 1 + ( (((struct sockaddr *)(sa))->sa_len - 1) | (sizeof(long) - 1) ) )
+#endif
+
int arp_enumerate(void *parm, int (*callback)())
{
int mib[6];