From: Rosen Penev Date: Thu, 16 May 2024 01:32:28 +0000 (-0700) Subject: nvme-cli: fix compilation with GCC14 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e2a3f6e340974ae0ad97bee2d0e8dc0d5991732a;p=openwrt-packages.git nvme-cli: fix compilation with GCC14 Wrong pointer type. Signed-off-by: Rosen Penev --- diff --git a/utils/nvme-cli/Makefile b/utils/nvme-cli/Makefile index 9a2ea41ff..4e52be331 100644 --- a/utils/nvme-cli/Makefile +++ b/utils/nvme-cli/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nvme-cli PKG_VERSION:=2.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/linux-nvme/nvme-cli/archive/refs/tags/v$(PKG_VERSION) diff --git a/utils/nvme-cli/patches/010-gcc14.patch b/utils/nvme-cli/patches/010-gcc14.patch new file mode 100644 index 000000000..63bc2415e --- /dev/null +++ b/utils/nvme-cli/patches/010-gcc14.patch @@ -0,0 +1,28 @@ +--- a/plugins/virtium/virtium-nvme.c ++++ b/plugins/virtium/virtium-nvme.c +@@ -32,14 +32,14 @@ static char vt_default_log_file_name[256 + struct vtview_log_header { + char path[256]; + char test_name[256]; +- long time_stamp; ++ time_t time_stamp; + struct nvme_id_ctrl raw_ctrl; + struct nvme_firmware_slot raw_fw; + }; + + struct vtview_smart_log_entry { + char path[256]; +- long time_stamp; ++ time_t time_stamp; + struct nvme_id_ns raw_ns; + struct nvme_id_ctrl raw_ctrl; + struct nvme_smart_log raw_smart; +@@ -127,7 +127,7 @@ static void vt_convert_smart_data_to_hum + + capacity = le64_to_cpu(smart->raw_ns.nsze) * lba; + +- snprintf(tempbuff, sizeof(tempbuff), "log;%s;%lu;%s;%s;%-.*s;", smart->raw_ctrl.sn, smart->time_stamp, smart->path, ++ snprintf(tempbuff, sizeof(tempbuff), "log;%s;%" PRId64 ";%s;%s;%-.*s;", smart->raw_ctrl.sn, smart->time_stamp, smart->path, + smart->raw_ctrl.mn, (int)sizeof(smart->raw_ctrl.fr), smart->raw_ctrl.fr); + strcpy(text, tempbuff); + snprintf(tempbuff, sizeof(tempbuff), "Capacity;%lf;", capacity / 1000000000);