2022-10-01 00:30:53 +00:00
|
|
|
From d53e8a0e94e34dc609e34dd5e404debda2640cfb Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ian Lance Taylor <iant@golang.org>
|
|
|
|
Date: Sat, 30 Jul 2022 07:29:28 -0700
|
|
|
|
Subject: [PATCH] libgo: use SYS_timer_settime32
|
|
|
|
MIME-Version: 1.0
|
|
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
Content-Transfer-Encoding: 8bit
|
2022-08-13 15:17:36 +00:00
|
|
|
|
2022-10-01 00:30:53 +00:00
|
|
|
Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems.
|
2022-08-13 15:17:36 +00:00
|
|
|
|
2022-10-01 00:30:53 +00:00
|
|
|
Based on patch by Sören Tempel.
|
2022-08-13 15:17:36 +00:00
|
|
|
|
2022-10-01 00:30:53 +00:00
|
|
|
Change-Id: I1f3485028d132ceca1aba595325af24b4d72b894
|
|
|
|
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
|
|
|
|
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
|
|
|
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
2022-08-13 15:17:36 +00:00
|
|
|
---
|
2022-10-01 00:30:53 +00:00
|
|
|
libgo/sysinfo.c | 5 +++++
|
|
|
|
1 file changed, 5 insertions(+)
|
2022-08-13 15:17:36 +00:00
|
|
|
|
|
|
|
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
|
2022-10-01 00:30:53 +00:00
|
|
|
index fc021099..180f5c31 100644
|
2022-08-13 15:17:36 +00:00
|
|
|
--- a/libgo/sysinfo.c
|
|
|
|
+++ b/libgo/sysinfo.c
|
2022-10-01 00:30:53 +00:00
|
|
|
@@ -354,6 +354,11 @@ enum {
|
2022-08-13 15:17:36 +00:00
|
|
|
};
|
2022-10-01 00:30:53 +00:00
|
|
|
#endif
|
2022-08-13 15:17:36 +00:00
|
|
|
|
2022-10-01 00:30:53 +00:00
|
|
|
+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
|
|
|
|
+// musl defines SYS_timer_settim32 on 32-bit systems.
|
2022-08-13 15:17:36 +00:00
|
|
|
+#define SYS_timer_settime SYS_timer_settime32
|
|
|
|
+#endif
|
|
|
|
+
|
2022-10-01 00:30:53 +00:00
|
|
|
#if defined(HAVE_LOFF_T)
|
|
|
|
// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
|
|
|
|
// see a typedef.
|