Files
pkgsrc-ng/emulators/wine/patches/patch-ad
2013-09-26 17:14:40 +02:00

61 lines
2.0 KiB
Plaintext

$NetBSD: patch-ad,v 1.15 2011/05/04 20:31:40 adam Exp $
--- dlls/iphlpapi/ipstats.c.orig 2010-12-10 22:33:07.000000000 +0300
+++ dlls/iphlpapi/ipstats.c 2010-12-22 00:38:30.000000000 +0300
@@ -27,6 +27,10 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
+#if defined(__NetBSD__)
+#include <sys/param.h>
+#endif
+#include <unistd.h>
#ifdef HAVE_ALIAS_H
#include <alias.h>
#endif
@@ -489,7 +493,7 @@
}
if (kc) kstat_close( kc );
}
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS)
+#elif defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS) && !defined(__NetBSD__)
{
int mib[] = {CTL_NET, PF_INET, IPPROTO_ICMP, ICMPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
@@ -655,7 +659,7 @@
}
if (kc) kstat_close( kc );
}
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS)
+#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) && !defined(__NetBSD__)
{
int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
@@ -804,7 +808,7 @@
}
if (kc) kstat_close( kc );
}
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS)
+#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) && !defined(__NetBSD__)
{
#ifndef TCPTV_MIN /* got removed in Mac OS X for some reason */
#define TCPTV_MIN 2
@@ -915,7 +919,7 @@
}
if (kc) kstat_close( kc );
}
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS)
+#elif defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS) && !defined(__NetBSD__)
{
int mib[] = {CTL_NET, PF_INET, IPPROTO_UDP, UDPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
@@ -1347,7 +1351,7 @@
}
else ret = ERROR_NOT_SUPPORTED;
}
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP)
+#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) && !defined(__NetBSD__)
{
int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))