pmaports/cross/gcc-armv7/0049-libgo-adjust-name-of-union-in-sigevent-struct.patch

29 lines
1.2 KiB
Diff
Raw Normal View History

From d54419ddcc14f52517017147201560da5353c436 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 17 Jul 2022 02:52:13 +0200
Subject: [PATCH] libgo: adjust name of union in sigevent struct
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The union in struct sigevent is named __sev_fields on musl but
_sigev_un on glibc. Not sure what this code actually does and
how this works if the union layout is different…
---
libgo/go/runtime/os_linux.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
index 96fb178870e..a75a2dd703f 100644
--- a/libgo/go/runtime/os_linux.go
+++ b/libgo/go/runtime/os_linux.go
@@ -365,7 +365,7 @@ func setThreadCPUProfiler(hz int32) {
var sevp _sigevent
sevp.sigev_notify = _SIGEV_THREAD_ID
sevp.sigev_signo = _SIGPROF
- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
+ *((*int32)(unsafe.Pointer(&sevp.__sev_fields))) = int32(mp.procid)
ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid)
if ret != 0 {
// If we cannot create a timer for this M, leave profileTimerValid false