From c032d257d7e66715d2f87676ff87b38070059b21 Mon Sep 17 00:00:00 2001 From: s Date: Tue, 29 Aug 2023 19:28:43 +0800 Subject: [PATCH] fix clang build error --- Fix-build-error-of-clang.patch | 13 +++++++++++++ pesign.spec | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Fix-build-error-of-clang.patch diff --git a/Fix-build-error-of-clang.patch b/Fix-build-error-of-clang.patch new file mode 100644 index 0000000..0844aca --- /dev/null +++ b/Fix-build-error-of-clang.patch @@ -0,0 +1,13 @@ +diff -u -r pesign-116/src/wincert.c pesign-116/src/wincert.c +--- pesign-116/src/wincert.c 2023-01-31 22:55:13.000000000 +0800 ++++ pesign-116/src/wincert.c 2023-08-29 19:26:07.000000000 +0800 +@@ -15,7 +15,9 @@ + * gives you stops right before the call to free() + */ + #pragma GCC diagnostic push ++#ifndef __clang__ + #pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak" ++#endif + static int + generate_cert_list(SECItem **signatures, int num_signatures, + void **cert_list, size_t *cert_list_size) diff --git a/pesign.spec b/pesign.spec index 2fea494..b5cffd8 100644 --- a/pesign.spec +++ b/pesign.spec @@ -2,7 +2,7 @@ Name: pesign Summary: Signing utility for UEFI binaries Version: 116 -Release: 1 +Release: 2 License: GPLv2 URL: https://github.com/rhboot/pesign Source0: https://github.com/rhboot/pesign/archive/refs/tags/116.tar.gz @@ -19,6 +19,7 @@ BuildRequires: python3-rpm-macros python3 systemd python3-devel gcc mandoc Patch0001: Bugfix-cms_common-fix-cert-match-check.patch Patch0002: 0001-cms_common-Fixed-Segmentation-fault.patch Patch9002: Fix-build-error-of-gcc-version-too-low.patch +Patch9003: Fix-build-error-of-clang.patch %description pesign is a command line tool for manipulating signatures and @@ -92,6 +93,9 @@ exit 0 %{_mandir}/man*/* %changelog +* Tue Aug 29 2023 yoo - 116-2 +- fix clang build error + * Thu May 04 2023 chenchen - 116-1 - Update to 116 -- Gitee