diff --git a/0029-backport-fix-missing-underline-in-iscsid_req.h.patch b/0029-backport-fix-missing-underline-in-iscsid_req.h.patch new file mode 100644 index 0000000000000000000000000000000000000000..d414834743ff32b575f34596df295e97d37a9597 --- /dev/null +++ b/0029-backport-fix-missing-underline-in-iscsid_req.h.patch @@ -0,0 +1,25 @@ +From edf9debf9764eb5173c744d51c42b973a77f636f Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Thu, 5 Sep 2024 19:45:09 +0800 +Subject: [PATCH] backport fix missing underline in iscsid_req.h + +--- + usr/iscsid_req.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/iscsid_req.h b/usr/iscsid_req.h +index d580ed2..27d58e1 100644 +--- a/usr/iscsid_req.h ++++ b/usr/iscsid_req.h +@@ -19,7 +19,7 @@ + */ + + #ifndef ISCSID_REQ_H_ +-#define ISCSID_REQ_H ++#define ISCSID_REQ_H_ + + #define ISCSID_REQ_TIMEOUT 1000 + +-- +2.43.0 + diff --git a/0030-fix-implicit-truncation-from-int-to-one-bit.patch b/0030-fix-implicit-truncation-from-int-to-one-bit.patch new file mode 100644 index 0000000000000000000000000000000000000000..ed3f202fe33a7268de9a8c4fc382dd5329e9dde1 --- /dev/null +++ b/0030-fix-implicit-truncation-from-int-to-one-bit.patch @@ -0,0 +1,25 @@ +From b1decbab06f79f731b5d2893f52786af7f5a6c9b Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Fri, 6 Sep 2024 00:34:05 +0800 +Subject: [PATCH] fix implicit truncation from int to a one-bit wide bit-field + +--- + usr/mgmt_ipc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c +index 054378e..00c0227 100644 +--- a/usr/mgmt_ipc.c ++++ b/usr/mgmt_ipc.c +@@ -501,7 +501,7 @@ void mgmt_ipc_handle(int accept_fd) + return; + } + +- qtask->allocated = 1; ++ qtask->allocated = (unsigned) 1; + qtask->mgmt_ipc_fd = fd; + + if (!mgmt_peeruser(fd, user) || strncmp(user, "root", PEERUSER_MAX)) { +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 74795297e96ea8cba9c3a4c8297d2bb327584cde..8585bcdd46d3dfec3371358bf3b209e1e1a84af6 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -4,7 +4,7 @@ Name: open-iscsi Version: 2.1.5 -Release: 14 +Release: 15 Summary: ISCSI software initiator daemon and utility programs License: GPLv2+ and BSD URL: http://www.open-iscsi.com @@ -37,6 +37,8 @@ patch25: 0025-iscsid-iscsiuio-fix-OOM-adjustment-377.patch patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch +patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch +patch30: 0030-fix-implicit-truncation-from-int-to-one-bit.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config @@ -91,7 +93,14 @@ This contains man files for the using of %{name}. perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build +%if "%toolchain"=="clang" +CFLAGS="%{optflags} -DUSE_KMOD -fPIC -Wno-error=unused-command-line-argument -Wno-error=ignored-attributes -Wno-error=unused-but-set-variable -Wno-error=gnu-variable-sized-type-not-at-end" \ +LDFLAGS="%{?__global_ldflags} -lkmod" \ +LIB_DIR=%{_libdir} +%make_build +%else %make_build OPTFLAGS="%{optflags} %{?__global_ldflags} -DUSE_KMOD -lkmod" LIB_DIR=%{_libdir} +%endif %install @@ -163,6 +172,9 @@ fi %{_mandir}/man8/* %changelog +* Thu Sep 5 2024 yuanchao <1050706328@qq.com> - 2.1.5-15 +- backport(fix missing underline in iscsid_req.h);fix implicit truncation from 'int' to a one-bit wide bit-field;separate compiler options and linker options and add -Wno-error options to support clang build + * Tue Feb 20 2024 jiangjianjun - 2.1.5-14 - update open-iscsi.spec