diff options
author | maya <maya@pkgsrc.org> | 2018-02-28 01:52:02 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2018-02-28 01:52:02 +0000 |
commit | 77ac2e4a51a9cdca647c71fd38bf15c59905260b (patch) | |
tree | 30e21a0e491a7d4c126eafcb4868a3b885b79a8b /net/net-snmp | |
parent | bc33ad520a562b35d1e7d12dcc44bb10414fb215 (diff) | |
download | pkgsrc-77ac2e4a51a9cdca647c71fd38bf15c59905260b.tar.gz |
net-snmp: PR kern/52945: snmpd does not work under current 8.0_BETA
it seems that configure cannot detect IP_PKTINFO correctly
because of using SOL_IP. SOL_IP is not defined on *BSD.
And on netbsd, struct ip_pktinfo has no ipi_spec_dst.
From Ryo Shimizu.
PKGREVISION++
Diffstat (limited to 'net/net-snmp')
-rw-r--r-- | net/net-snmp/Makefile | 5 | ||||
-rw-r--r-- | net/net-snmp/distinfo | 3 | ||||
-rw-r--r-- | net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c | 27 |
3 files changed, 32 insertions, 3 deletions
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index 12fd95335e9..59bc48c5d5a 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.122 2018/02/25 18:35:29 wiz Exp $ +# $NetBSD: Makefile,v 1.123 2018/02/28 01:52:02 maya Exp $ .include "Makefile.common" CATEGORIES= net -PKGREVISION= 9 +PKGREVISION= 10 MAINTAINER= adam@NetBSD.org COMMENT= Extensible SNMP implementation @@ -30,6 +30,7 @@ OSVERSION_SPECIFIC= YES . if empty(CFLAGS:U:M*-Dnetbsd1*) CFLAGS+= -Dnetbsd1 . endif +CFLAGS+= -DSOL_IP=IPPROTO_IP .endif .if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat) diff --git a/net/net-snmp/distinfo b/net/net-snmp/distinfo index c699ba4c7bc..d8c80c2141e 100644 --- a/net/net-snmp/distinfo +++ b/net/net-snmp/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.92 2018/02/25 18:35:29 wiz Exp $ +$NetBSD: distinfo,v 1.93 2018/02/28 01:52:02 maya Exp $ SHA1 (net-snmp-5.7.3.tar.gz) = 97dc25077257680815de44e34128d365c76bd839 RMD160 (net-snmp-5.7.3.tar.gz) = c5cf54d5723ee417e07f1f9fa3936aef505104a2 @@ -58,3 +58,4 @@ SHA1 (patch-perl_manager_Makefile.PL) = bb34b119a2b3887a1af1f9b88e6d4bad6baf60bb SHA1 (patch-snmplib_keytools.c) = c209a42a2767c8639d8535e02542de119264ebfc SHA1 (patch-snmplib_scapi.c) = 9a49b1a00df8f9ab6bd69057f806377e9164cf1f SHA1 (patch-snmplib_snmp__api.c) = b4f498aa93b61f809e3696df1fc6bf32bd942233 +SHA1 (patch-snmplib_transports_snmpUDPBaseDomain.c) = a7eec599e1cfb2fbd22d0dd53412727b5ff1825d diff --git a/net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c b/net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c new file mode 100644 index 00000000000..cb36edb5221 --- /dev/null +++ b/net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c @@ -0,0 +1,27 @@ +$NetBSD: patch-snmplib_transports_snmpUDPBaseDomain.c,v 1.1 2018/02/28 01:52:02 maya Exp $ + +it seems that configure cannot detect IP_PKTINFO correctly +because of using SOL_IP. SOL_IP is not defined on *BSD. +And on netbsd, struct ip_pktinfo has no ipi_spec_dst. +(PR pkg/52945) + +--- snmplib/transports/snmpUDPBaseDomain.c.orig 2014-12-08 20:23:22.000000000 +0000 ++++ snmplib/transports/snmpUDPBaseDomain.c +@@ -277,7 +277,7 @@ int netsnmp_udpbase_sendto(int fd, struc + * come from. + */ + ipi.ipi_ifindex = 0; +-#if defined(cygwin) ++#if defined(cygwin) || defined(__NetBSD__) + ipi.ipi_addr.s_addr = srcip->s_addr; + #else + ipi.ipi_spec_dst.s_addr = srcip->s_addr; +@@ -302,7 +302,7 @@ int netsnmp_udpbase_sendto(int fd, struc + + memset(&ipi, 0, sizeof(ipi)); + ipi.ipi_ifindex = if_index; +-#if defined(cygwin) ++#if defined(cygwin) || defined(__NetBSD__) + ipi.ipi_addr.s_addr = INADDR_ANY; + #else + ipi.ipi_spec_dst.s_addr = INADDR_ANY; |