From de22e4f2681e244f5593ae6fc60fbc51e36432b3 Mon Sep 17 00:00:00 2001 From: cherry530 Date: Wed, 2 Mar 2022 21:06:43 +0800 Subject: [PATCH] Fix build error Signed-off-by: cherry530 (cherry picked from commit 35d0cca39133fb4e1c6d588938d0caa2a371283c) --- ...-Fix-build-error-to-change-char-type.patch | 23 +++++++++++++++++++ fcoe-utils.spec | 7 ++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 backport-Fix-build-error-to-change-char-type.patch diff --git a/backport-Fix-build-error-to-change-char-type.patch b/backport-Fix-build-error-to-change-char-type.patch new file mode 100644 index 0000000..667ca36 --- /dev/null +++ b/backport-Fix-build-error-to-change-char-type.patch @@ -0,0 +1,23 @@ +From 7f4c8df2adb258d61be3df7cee24afef2901629d Mon Sep 17 00:00:00 2001 +From: Guillaume Gardet +Date: Thu, 20 Aug 2020 09:55:47 +0000 +Subject: [PATCH 1/1] char can be unsigned on arm, so set signed explicitly as + the check expects it can be negative + +--- + fcnsq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fcnsq.c b/fcnsq.c +index 1597cd5..c59c428 100644 +--- a/fcnsq.c ++++ b/fcnsq.c +@@ -381,7 +381,7 @@ int main(int argc, char *argv[]) + u64 wwnn = 0; + int rc = 0; + enum commands cmd = 0; +- char c; ++ signed char c; + uintmax_t wwnn_tmp = 0; + + while(1) { diff --git a/fcoe-utils.spec b/fcoe-utils.spec index 2df1f4d..30fb409 100644 --- a/fcoe-utils.spec +++ b/fcoe-utils.spec @@ -1,6 +1,6 @@ Name: fcoe-utils Version: 1.0.33 -Release: 2 +Release: 3 Summary: Fibre Channel over Ethernet utilities License: GPLv2 URL: https://github.com/morbidrsa/fcoe-utils @@ -11,7 +11,7 @@ Patch1: backport-01-fix_VLAN_device_name_overflow_check.patch Patch2: backport-02-string_op_truncation_format_trauncation.patch Patch3: backport-03-use-of-uninitialized-values-detected-during-LTO.patch #This patch refer to ubuntu's version - +Patch4: backport-Fix-build-error-to-change-char-type.patch BuildRequires: autoconf automake libpciaccess-devel libtool lldpad-devel systemd Requires: lldpad iproute device-mapper-multipath @@ -67,6 +67,9 @@ done %{_mandir}/man8/* %changelog +* Wed Mar 03 2022 xu_ping - 1.0.33-3 +- Backport upstream patch to avoid non-X86 build break. + * Wed Aug 2021 sunguoshuai - 1.0.33-2 - Fix fcoe.service start error -- Gitee