From eebc8979d68ffdc3cbe8d10a8821e540485b3304 Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Wed, 27 Mar 2024 11:30:55 +0800 Subject: [PATCH] support clang build --- 0006-fix-clang.patch | 38 ++++++++++++++++++++++++++++++++++++++ nfs-utils.spec | 10 ++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 0006-fix-clang.patch diff --git a/0006-fix-clang.patch b/0006-fix-clang.patch new file mode 100644 index 0000000..579b735 --- /dev/null +++ b/0006-fix-clang.patch @@ -0,0 +1,38 @@ +From 4dd19ae494bdb3333c7786f61c96ec4de78e13d1 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Sun, 4 Feb 2024 11:54:50 +0000 +Subject: [PATCH] support clang build + +--- + utils/gssd/gssd_proc.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c +index ae568f1..533db13 100644 +--- a/utils/gssd/gssd_proc.c ++++ b/utils/gssd/gssd_proc.c +@@ -776,17 +776,16 @@ process_krb5_upcall(struct clnt_upcall_info *info) + + do_downcall(fd, uid, &pd, &token, lifetime_rec, &acceptor); + +-out: +- pthread_cleanup_pop(1); +- +- return; +- + out_return_error: + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); + + do_error_downcall(fd, uid, downcall_err); + goto out; ++ ++out: ++ pthread_cleanup_pop(1); ++ return; + } + + static struct clnt_upcall_info * +-- +2.33.0 + diff --git a/nfs-utils.spec b/nfs-utils.spec index 2705e42..6a91756 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -4,7 +4,7 @@ Name: nfs-utils Version: 2.6.3 -Release: 1 +Release: 2 Epoch: 2 Summary: The Linux NFS userland utility package License: MIT and GPLv2 and GPLv2+ and BSD @@ -121,7 +121,7 @@ find -name \*.py -exec sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!%{__python3}|' { %build sh -x autogen.sh %configure \ - CFLAGS="%{build_cflags} -D_FILE_OFFSET_BITS=64" \ + CFLAGS="%{build_cflags} -D_FILE_OFFSET_BITS=64 " \ LDFLAGS="%{build_ldflags}" \ --enable-mountconfig \ --enable-ipv6 \ @@ -290,6 +290,12 @@ fi %{_mandir}/*/* %changelog +* Wed Nov 15 2023 luofeng - 2:2.6.3-2 +- Type:enhencement +- CVE:NA +- SUG:NA +- DESC:support clang build + * Wed Jan 10 2024 wuguanghao - 2:2.6.3-1 - upgrade version to 2.6.3 -- Gitee