From 6fe409b11437dd80feb82f8fff08bef9115fe6f5 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Wed, 10 May 2023 08:41:21 +0800 Subject: [PATCH] fix build error for loongarch64 --- 0001-fix-build-error-for-loongarch64.patch | 26 ++++++++++++++++++++++ chrony.spec | 12 ++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 0001-fix-build-error-for-loongarch64.patch diff --git a/0001-fix-build-error-for-loongarch64.patch b/0001-fix-build-error-for-loongarch64.patch new file mode 100644 index 0000000..db8a076 --- /dev/null +++ b/0001-fix-build-error-for-loongarch64.patch @@ -0,0 +1,26 @@ +From 8708cdee1d13afcd1ccb542d92d3c6f440f48b1d Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Tue, 9 May 2023 13:28:46 +0000 +Subject: [PATCH] fix build error for loongarch64 + +--- + sys_linux.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sys_linux.c b/sys_linux.c +index 50c0843..a34752d 100644 +--- a/sys_linux.c ++++ b/sys_linux.c +@@ -536,7 +536,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context) + SCMP_SYS(faccessat), + SCMP_SYS(fchmodat), + SCMP_SYS(fchownat), ++#ifndef __loongarch64 + SCMP_SYS(fstat), ++#endif + SCMP_SYS(fstat64), + SCMP_SYS(fstatat64), + SCMP_SYS(getdents), +-- +2.33.0 + diff --git a/chrony.spec b/chrony.spec index 476e34c..bb4b685 100644 --- a/chrony.spec +++ b/chrony.spec @@ -2,7 +2,7 @@ Name: chrony Version: 4.1 -Release: 4 +Release: 5 Summary: An NTP client/server License: GPLv2 URL: https://chrony.tuxfamily.org @@ -15,6 +15,9 @@ Patch1: chrony-nm-dispatcher-dhcp.patch Patch6000: backport-check-for-stdout-errors-in-client.patch Patch6001: backport-fix-initial-poll-to-follow-non-LAN-minimum.patch +%ifarch loongarch64 +Patch6002: 0001-fix-build-error-for-loongarch64.patch +%endif BuildRequires: gcc gcc-c++ bison systemd libcap-devel libedit-devel nettle-devel pps-tools-devel libseccomp-devel gnutls-devel gnutls-utils @@ -30,7 +33,6 @@ service to other computers in the network. %package_help %prep - %autosetup -p1 -n %{name}-%{version} -a 6 mv clknetsim-%{clknetsim_ver}* test/simulation/clknetsim @@ -138,6 +140,12 @@ fi %{_mandir}/man[158]/%{name}*.[158]* %changelog +* Mon May 8 2023 Wenlong Zhang - 4.1-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix build error for loongarch64 + * Sat May 6 2023 chengyechun - 4.1-4 - Type:bugfix - ID:NA -- Gitee