From ddd12c61d0eab9738137bfd9a86fa17d52dc9235 Mon Sep 17 00:00:00 2001 From: Jingyun Hua Date: Fri, 26 May 2023 08:53:01 +0000 Subject: [PATCH] Fix build error on loongarch64 --- Define-NR_fstat-for-loongarch64.patch | 26 ++++++++++++++++++++++++++ gperftools.spec | 6 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 Define-NR_fstat-for-loongarch64.patch diff --git a/Define-NR_fstat-for-loongarch64.patch b/Define-NR_fstat-for-loongarch64.patch new file mode 100644 index 0000000..e68dc86 --- /dev/null +++ b/Define-NR_fstat-for-loongarch64.patch @@ -0,0 +1,26 @@ +From 6ef4a957cf53c30843108877d2504fc3a928334c Mon Sep 17 00:00:00 2001 +From: Jingyun Hua +Date: Fri, 26 May 2023 08:41:44 +0000 +Subject: [PATCH] Define NR_fstat for loongarch64 + +--- + src/base/linux_syscall_support.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/base/linux_syscall_support.h b/src/base/linux_syscall_support.h +index 658fe3a..f48eda0 100644 +--- a/src/base/linux_syscall_support.h ++++ b/src/base/linux_syscall_support.h +@@ -993,6 +993,9 @@ struct kernel_stat { + #ifndef __NR_fstatat + #define __NR_fstatat 79 + #endif ++#ifndef __NR_fstat ++#define __NR_fstat 80 ++#endif + #ifndef __NR_getdents64 + #define __NR_getdents64 61 + #endif /* End of loongarch64 defininitions */ +-- +2.33.0 + diff --git a/gperftools.spec b/gperftools.spec index e5317e6..464ee1f 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -1,6 +1,6 @@ Name: gperftools Version: 2.9.1 -Release: 7 +Release: 8 Summary: high-performance malloc and performance analysis tools License: BSD @@ -16,6 +16,7 @@ Patch9004: skip-tcm_asserts_unittest.patch Patch9005: Continue-to-release-span-until-the-end-of-one-round.patch Patch9006: gperftools-2.9.1-sw.patch Patch9007: add-support-loongarch64.patch +Patch9008: Define-NR_fstat-for-loongarch64.patch BuildRequires: autoconf automake gcc-c++ @@ -114,6 +115,9 @@ LD_LIBRARY_PATH=./.libs make check %{_mandir}/man1/*.1.gz %changelog +* Fri May 26 2023 huajingyun - 2.9.1-8 +- Fix build error on loongarch64 + * Mon Jan 9 2023 huajingyun - 2.9.1-7 - add loongarch64 support -- Gitee