net-snmp: portability fixes from Alpine.

This commit is contained in:
Juan RP 2015-05-08 11:57:34 +02:00
parent 292ce123d1
commit d34dfeb696
3 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,10 @@
--- agent/mibgroup/util_funcs/get_pid_from_inode.c.orig
+++ agent/mibgroup/util_funcs/get_pid_from_inode.c
@@ -4,6 +4,7 @@
#include <net-snmp/output_api.h>
+#include <limits.h>
#include <ctype.h>
#include <stdio.h>
#if HAVE_STDLIB_H

View file

@ -0,0 +1,13 @@
--- agent/mibgroup/host/data_access/swinst_pkginfo.c.orig
+++ agent/mibgroup/host/data_access/swinst_pkginfo.c
@@ -207,7 +207,9 @@
memcpy( entry->swDate, cp, date_len );
entry->swDate_len = date_len;
}
- closedir( d );
+ if (d != NULL)
+ closedir( d );
+
#ifdef HAVE_LIBPKG
}
#endif

View file

@ -1,7 +1,7 @@
# Template build file for 'net-snmp'.
pkgname=net-snmp
version=5.7.3
revision=3
revision=4
hostmakedepends="pkg-config unzip"
makedepends="bzip2-devel libressl-devel libnl-devel pciutils-devel"
short_desc="Simple Network Management Protocol (SNMP) suite"
@ -12,6 +12,8 @@ license="BSD"
distfiles="$SOURCEFORGE_SITE/$pkgname/$pkgname-$version.zip"
checksum=e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e
LDFLAGS="-lpthread"
do_configure() {
./configure ${configure_args} --enable-ucd-snmp-compatibility \
--enable-ipv6 --with-default-snmp-version="3" \