aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-07-30 07:29:28 -0700
committerIan Lance Taylor <iant@golang.org>2022-07-30 10:35:23 -0700
commita63b99f24df3f2a65133e22dd8a0f70e7b706fd6 (patch)
treeb0b9e1d3e885a10de71b2b2c5be11f9f1ab0134c /libgo
parent2fa8c4a659a19ec971c80704f48f96c13aae9ac3 (diff)
downloadgcc-a63b99f24df3f2a65133e22dd8a0f70e7b706fd6.zip
gcc-a63b99f24df3f2a65133e22dd8a0f70e7b706fd6.tar.gz
gcc-a63b99f24df3f2a65133e22dd8a0f70e7b706fd6.tar.bz2
libgo: use SYS_timer_settime32
Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
Diffstat (limited to 'libgo')
-rw-r--r--libgo/sysinfo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index fc02109..180f5c3 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -354,6 +354,11 @@ enum {
};
#endif
+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
+// musl defines SYS_timer_settim32 on 32-bit systems.
+#define SYS_timer_settime SYS_timer_settime32
+#endif
+
#if defined(HAVE_LOFF_T)
// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
// see a typedef.