commit: 98512d626268d232434aa24d0450ddd5ac8c71d9 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> AuthorDate: Mon Apr 20 14:59:33 2020 +0000 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> CommitDate: Mon Apr 20 15:01:45 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98512d62
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 <AT> gentoo.org> ...-plugins-linux-madrisan-25-fix-musl-build.patch | 35 ++++++++++++++++++++++ .../nagios-plugins-linux-madrisan-25-r1.ebuild | 6 +++- 2 files changed, 40 insertions(+), 1 deletion(-) 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 00000000000..3220be24731 --- /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.lo...@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 284d0d9d1a8..e56c277678f 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}"