From d34dfeb69631dc97f07be613c31e016980ef4886 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 8 May 2015 11:57:34 +0200 Subject: [PATCH] net-snmp: portability fixes from Alpine. --- srcpkgs/net-snmp/patches/fix-includes.patch | 10 ++++++++++ srcpkgs/net-snmp/patches/netsnmp-swinst-crash.patch | 13 +++++++++++++ srcpkgs/net-snmp/template | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/net-snmp/patches/fix-includes.patch create mode 100644 srcpkgs/net-snmp/patches/netsnmp-swinst-crash.patch diff --git a/srcpkgs/net-snmp/patches/fix-includes.patch b/srcpkgs/net-snmp/patches/fix-includes.patch new file mode 100644 index 0000000000..d6f1cf2813 --- /dev/null +++ b/srcpkgs/net-snmp/patches/fix-includes.patch @@ -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 + ++#include + #include + #include + #if HAVE_STDLIB_H diff --git a/srcpkgs/net-snmp/patches/netsnmp-swinst-crash.patch b/srcpkgs/net-snmp/patches/netsnmp-swinst-crash.patch new file mode 100644 index 0000000000..4f82ceed58 --- /dev/null +++ b/srcpkgs/net-snmp/patches/netsnmp-swinst-crash.patch @@ -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 diff --git a/srcpkgs/net-snmp/template b/srcpkgs/net-snmp/template index 9fd7c463a9..1c2874e8b9 100644 --- a/srcpkgs/net-snmp/template +++ b/srcpkgs/net-snmp/template @@ -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" \