Skip to content

Commit

Permalink
sys-apps/nvme-cli: fix musl build
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/829705
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Dec 20, 2021
1 parent 59c02db commit b24dbb2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions sys-apps/nvme-cli/files/nvme-cli-1.16-musl-limits.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
https://github.com/linux-nvme/nvme-cli/commit/4729b13f36d4713ce1162dc1d4425d44e1474078.patch
https://bugs.gentoo.org/829705

From: Ariadne Conill <[email protected]>
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 <[email protected]>
[dwagner: removed nvme-topology.c bits]
Signed-off-by: Daniel Wagner <[email protected]>
--- 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"
4 changes: 4 additions & 0 deletions sys-apps/nvme-cli/nvme-cli-1.16.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ RDEPEND="json? ( dev-libs/json-c:= )
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

PATCHES=(
"${FILESDIR}"/${P}-musl-limits.patch
)

src_prepare() {
default

Expand Down

0 comments on commit b24dbb2

Please sign in to comment.