diff options
author | Sam James <sam@gentoo.org> | 2024-06-12 03:00:19 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-12 03:00:19 +0100 |
commit | f613fb6ac78a86b44272cbd40a791c714a98d7bb (patch) | |
tree | 344cabaf5d7faaf863758dc3bf3aed1e04a833ca /sys-apps/nvme-cli | |
parent | dev-db/libdbi-drivers: fix memory corruption issues w/ sqlite (diff) | |
download | gentoo-f613fb6ac78a86b44272cbd40a791c714a98d7bb.tar.gz gentoo-f613fb6ac78a86b44272cbd40a791c714a98d7bb.tar.bz2 gentoo-f613fb6ac78a86b44272cbd40a791c714a98d7bb.zip |
sys-apps/nvme-cli: fix musl build
Closes: https://bugs.gentoo.org/934081
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-2.9.1-musl.patch | 28 | ||||
-rw-r--r-- | sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch b/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch new file mode 100644 index 000000000000..de7b488cc25d --- /dev/null +++ b/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/934081 +https://github.com/linux-nvme/nvme-cli/commit/650070ad5d4a97fc87f9018743e3b566deba36c8 + +From 650070ad5d4a97fc87f9018743e3b566deba36c8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 21 May 2024 14:09:32 -0700 +Subject: [PATCH] plugins/ssstc: Replace __uint16_t with uint16_t + +uint16_t is ISO defined and comes from stdint.h, makes it +portable across glibc and musl on linux. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/plugins/ssstc/ssstc-nvme.c ++++ b/plugins/ssstc/ssstc-nvme.c +@@ -64,9 +64,9 @@ void show_ssstc_add_smart_log_jsn(struct nvme_additional_smart_log *smart, + unsigned int nsid, const char *devname) + { + struct json_object *root, *entry_stats, *dev_stats, *multi; +- __uint16_t wear_level_min = 0; +- __uint16_t wear_level_max = 0; +- __uint16_t wear_level_avg = 0; ++ uint16_t wear_level_min = 0; ++ uint16_t wear_level_max = 0; ++ uint16_t wear_level_avg = 0; + uint64_t raw_val = 0; + + root = json_create_object(); + diff --git a/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild b/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild index ead3edbdb1f6..991abb4ea462 100644 --- a/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild +++ b/sys-apps/nvme-cli/nvme-cli-2.9.1.ebuild @@ -29,6 +29,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-2.9.1-musl-stdint.patch + "${FILESDIR}"/${PN}-2.9.1-musl.patch ) src_configure() { |