net-analyzer/net-snmp: add missing include <limits.h>
authorAnthony G. Basile <blueness@gentoo.org>
Wed, 21 Feb 2018 20:44:28 +0000 (15:44 -0500)
committerAnthony G. Basile <blueness@gentoo.org>
Wed, 21 Feb 2018 20:44:46 +0000 (15:44 -0500)
PATH_MAX and NAME_MAX requires <limits.h> according to POSIX.  This
problem shows up on non-glibc systems.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch [new file with mode: 0644]
net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild
net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild
net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch
new file mode 100644 (file)
index 0000000..04eafbb
--- /dev/null
@@ -0,0 +1,15 @@
+POSIX requires <limits.h> for PATH_MAX and NAME_MAX
+
+Author: Anthony G. Basile <blueness@gentoo.org>
+
+diff -Naur net-snmp-5.7.3.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c net-snmp-5.7.3/agent/mibgroup/util_funcs/get_pid_from_inode.c
+--- net-snmp-5.7.3.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c 2014-12-08 15:23:22.000000000 -0500
++++ net-snmp-5.7.3/agent/mibgroup/util_funcs/get_pid_from_inode.c      2018-02-21 15:34:06.237028136 -0500
+@@ -6,6 +6,7 @@
+ 
+ #include <ctype.h>
+ #include <stdio.h>
++#include <limits.h>
+ #if HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif
index 00afce2aacf4d83873652589bdb349038e6e7ff2..11979c188f944a46c513c282d4ac7cd3edd80f01 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,6 +81,7 @@ src_prepare() {
 
        epatch "${WORKDIR}"/${P}-perl524.patch
        epatch "${WORKDIR}"/${P}-perl524-2.patch
+       epatch "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
 
        epatch "${WORKDIR}"/patches/*.patch
 
index 044f8d6bb3112c51a6141d916bc7c278d691412f..b89ac3cf3f1558f0366f937539665490a50269e4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,6 +81,7 @@ src_prepare() {
 
        epatch "${WORKDIR}"/${P}-perl524.patch
        epatch "${WORKDIR}"/${P}-perl524-2.patch
+       epatch "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
 
        epatch "${WORKDIR}"/patches/*.patch
 
index 4175fec18f21c2fbf572b2763ae8e95d2078107f..77645313cf35edc0cea8762f76e3a6336c3b2769 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -82,6 +82,7 @@ src_prepare() {
        eapply "${WORKDIR}"/${PN}-5.7.3-perl524.patch
        eapply "${FILESDIR}"/${PN}-5.7.3-perl524-2.patch
        eapply "${FILESDIR}"/${PN}-5.7.3-mariadb-10.2.patch
+       eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
 
        eapply "${WORKDIR}"/patches/*.patch