When constructing, HAVE_ARCH_OLD_TIME64_SYSCALLS SIZEOF_LONG == 8,

resulting in failure to build ilp32, need to add SIZEOF_LONG == 4 to fit ilp32

Signed-off-by: ChenZanYu <chenzanyu@huawei.com>
(cherry picked from commit 066cdae692ccbf1d1bdbdcf27acd1d68c6ebb3ad)
This commit is contained in:
ChenZanYu 2023-04-04 10:55:43 +00:00 committed by openeuler-sync-bot
parent 388b19cdbf
commit f0f199c239
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From cab8b0976b7b1c7653728ab27014b2553416981b Mon Sep 17 00:00:00 2001
From: chenzanyu <chenzanyu@huawei.com>
Date: Tue, 4 Apr 2023 16:13:37 +0800
Subject: [PATCH] strace: solve ilp32 strace build error
reason: When constructing, HAVE_ARCH_OLD_TIME64_SYSCALLS SIZEOF_LONG == 8,
resulting in failure to build ilp32, need to add SIZEOF_LONG == 4 to fit ilp32
Signed-off-by: chenzanyu <chenzanyu@huawei.com>
---
src/arch_defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch_defs.h b/src/arch_defs.h
index bb35252..e3d2bf3 100644
--- a/src/arch_defs.h
+++ b/src/arch_defs.h
@@ -66,7 +66,7 @@
# endif
# ifndef HAVE_ARCH_OLD_TIME64_SYSCALLS
-# define HAVE_ARCH_OLD_TIME64_SYSCALLS (SIZEOF_LONG == 8)
+# define HAVE_ARCH_OLD_TIME64_SYSCALLS ((SIZEOF_LONG == 4) || (SIZEOF_LONG == 8))
# endif
# ifndef MIN_KLONGSIZE
--
2.12.3

View File

@ -3,7 +3,7 @@
Summary: Tracks and displays system calls associated with a running process Summary: Tracks and displays system calls associated with a running process
Name: strace Name: strace
Version: 5.14 Version: 5.14
Release: 3 Release: 4
# The test suite is GPLv2+, all the rest is LGPLv2.1+. # The test suite is GPLv2+, all the rest is LGPLv2.1+.
License: LGPL-2.1+ and GPL-2.0+ License: LGPL-2.1+ and GPL-2.0+
# Some distros require Group tag to be present, # Some distros require Group tag to be present,
@ -21,6 +21,7 @@ Source: strace-%{version}.tar.gz
Patch1: strace-5.14-sw.patch Patch1: strace-5.14-sw.patch
%endif %endif
Patch2: strace-5.14-loongarch64.patch Patch2: strace-5.14-loongarch64.patch
Patch3: strace-5.14-solve-ilp32-strace-build-error.patch
BuildRequires: gcc gzip BuildRequires: gcc gzip
# Install Bluetooth headers for AF_BLUETOOTH sockets decoding. # Install Bluetooth headers for AF_BLUETOOTH sockets decoding.
@ -105,6 +106,9 @@ wait
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Tue Apr 4 2023 chenzanyu <chenzanyu@huawei.com> - 5.14-4
- solve ilp32 strace build error
* Tue Jan 10 2023 Hui Li<lihui@loongson.cn> - 5.14-3 * Tue Jan 10 2023 Hui Li<lihui@loongson.cn> - 5.14-3
- Add loongarch64 architecture - Add loongarch64 architecture