summaryrefslogtreecommitdiff
path: root/sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch')
-rw-r--r--sys-apps/nvme-cli/files/nvme-cli-2.9.1-musl.patch28
1 files changed, 28 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();
+