summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-20 23:52:22 +0000
committerSam James <sam@gentoo.org>2021-12-20 23:52:52 +0000
commitb24dbb2a1dc978481648d73d380422dd06083ae8 (patch)
tree6de9f913573cd57c793d90571cc3e652704487b4 /sys-apps/nvme-cli
parentnet-misc/kafkacat: fix home page (diff)
downloadgentoo-b24dbb2a1dc978481648d73d380422dd06083ae8.tar.gz
gentoo-b24dbb2a1dc978481648d73d380422dd06083ae8.tar.bz2
gentoo-b24dbb2a1dc978481648d73d380422dd06083ae8.zip
sys-apps/nvme-cli: fix musl build
Closes: https://bugs.gentoo.org/829705 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/nvme-cli')
-rw-r--r--sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch24
-rw-r--r--sys-apps/nvme-cli/nvme-cli-1.16.ebuild4
2 files changed, 28 insertions, 0 deletions
diff --git a/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch b/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
new file mode 100644
index 000000000000..12e66577d69d
--- /dev/null
+++ b/sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
@@ -0,0 +1,24 @@
+https://github.com/linux-nvme/nvme-cli/commit/4729b13f36d4713ce1162dc1d4425d44e1474078.patch
+https://bugs.gentoo.org/829705
+
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Mon, 26 Apr 2021 00:41:20 -0600
+Subject: [PATCH] nvme-rpmb: Add limits.h due to missing PATH_MAX definition
+
+Commit 21f40f38b introduced new use of PATH_MAX, but did not add the
+limits.h header. This resulted in nvme-cli failing to build on
+ppc64le systems using the musl C library.
+
+Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
+[dwagner: removed nvme-topology.c bits]
+Signed-off-by: Daniel Wagner <dwagner@suse.de>
+--- a/nvme-rpmb.c
++++ b/nvme-rpmb.c
+@@ -25,6 +25,7 @@
+ #include <sys/socket.h>
+ #include <linux/if_alg.h>
+ #include <linux/socket.h>
++#include <limits.h>
+
+ #include "nvme.h"
+ #include "libnvme.h"
diff --git a/sys-apps/nvme-cli/nvme-cli-1.16.ebuild b/sys-apps/nvme-cli/nvme-cli-1.16.ebuild
index 0debd0e006e6..1f0ebaf7bde5 100644
--- a/sys-apps/nvme-cli/nvme-cli-1.16.ebuild
+++ b/sys-apps/nvme-cli/nvme-cli-1.16.ebuild
@@ -22,6 +22,10 @@ RDEPEND="json? ( dev-libs/json-c:= )
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${P}-musl-limits.patch
+)
+
src_prepare() {
default