summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2020-04-20 16:59:33 +0200
committerLouis Sautier <sbraz@gentoo.org>2020-04-20 17:01:45 +0200
commit98512d626268d232434aa24d0450ddd5ac8c71d9 (patch)
tree2e4ae9dc09f7be126ca821f8b8c4ddec61ad0138
parentwww-servers/varnish: 6.3.2 works with python 3.7 and 3.8 (diff)
downloadgentoo-98512d626268d232434aa24d0450ddd5ac8c71d9.tar.gz
gentoo-98512d626268d232434aa24d0450ddd5ac8c71d9.tar.bz2
gentoo-98512d626268d232434aa24d0450ddd5ac8c71d9.zip
net-analyzer/nagios-plugins-linux-madrisan: fix build with musl
Closes: https://bugs.gentoo.org/717038 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
-rw-r--r--net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch35
-rw-r--r--net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild6
2 files changed, 40 insertions, 1 deletions
diff --git a/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch
new file mode 100644
index 000000000000..3220be247319
--- /dev/null
+++ b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch
@@ -0,0 +1,35 @@
+commit 72547f774641d3ed881cc957a6d6c20d5e3370ec
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Mon Apr 20 16:40:08 2020 +0200
+
+ Fix build with musl by including limits.h when PATH_MAX is used
+
+ Otherwise, the build fails with:
+ error: PATH_MAX undeclared (first use in this function)
+
+ Bug: https://bugs.gentoo.org/717038
+
+diff --git a/lib/processes.c b/lib/processes.c
+index cb006ca..e65992d 100644
+--- a/lib/processes.c
++++ b/lib/processes.c
+@@ -26,6 +26,7 @@
+ #include <ctype.h>
+ #include <dirent.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <pwd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/plugins/check_fc.c b/plugins/check_fc.c
+index b798377..cfaafa5 100644
+--- a/plugins/check_fc.c
++++ b/plugins/check_fc.c
+@@ -22,6 +22,7 @@
+ #include <dirent.h>
+ #include <errno.h>
+ #include <getopt.h>
++#include <limits.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild
index 284d0d9d1a83..e56c277678f3 100644
--- a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild
+++ b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild
@@ -22,7 +22,11 @@ RDEPEND="${DEPEND}"
# https://github.com/madrisan/nagios-plugins-linux/issues/48
# Will be in the next release
-PATCHES=( "${FILESDIR}/${P}-fix-fno-common.patch" )
+# https://github.com/madrisan/nagios-plugins-linux/pull/52
+PATCHES=(
+ "${FILESDIR}/${P}-fix-fno-common.patch"
+ "${FILESDIR}/${P}-fix-musl-build.patch"
+)
S="${WORKDIR}/${MY_P}"