Files
Archive/clash-meta-android/.github/patch/remove_64bits_syscall_on_32bit_linux.patch
T
2026-02-21 19:48:39 +01:00

57 lines
1.7 KiB
Diff

Subject: [PATCH] remove 64bits syscall on 32bit linux
---
Index: src/runtime/os_linux32.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/runtime/os_linux32.go b/src/runtime/os_linux32.go
--- a/src/runtime/os_linux32.go (revision 030384681641464bf71ed16500075c458363510f)
+++ b/src/runtime/os_linux32.go (date 1771666707318)
@@ -21,14 +21,14 @@
//go:nosplit
func futex(addr unsafe.Pointer, op int32, val uint32, ts *timespec, addr2 unsafe.Pointer, val3 uint32) int32 {
- if !isFutexTime32bitOnly.Load() {
- ret := futex_time64(addr, op, val, ts, addr2, val3)
- // futex_time64 is only supported on Linux 5.0+
- if ret != -_ENOSYS {
- return ret
- }
- isFutexTime32bitOnly.Store(true)
- }
+ //if !isFutexTime32bitOnly.Load() {
+ // ret := futex_time64(addr, op, val, ts, addr2, val3)
+ // // futex_time64 is only supported on Linux 5.0+
+ // if ret != -_ENOSYS {
+ // return ret
+ // }
+ // isFutexTime32bitOnly.Store(true)
+ //}
// Downgrade ts.
var ts32 timespec32
var pts32 *timespec32
@@ -49,14 +49,14 @@
//go:nosplit
func timer_settime(timerid int32, flags int32, new, old *itimerspec) int32 {
- if !isSetTime32bitOnly.Load() {
- ret := timer_settime64(timerid, flags, new, old)
- // timer_settime64 is only supported on Linux 5.0+
- if ret != -_ENOSYS {
- return ret
- }
- isSetTime32bitOnly.Store(true)
- }
+ //if !isSetTime32bitOnly.Load() {
+ // ret := timer_settime64(timerid, flags, new, old)
+ // // timer_settime64 is only supported on Linux 5.0+
+ // if ret != -_ENOSYS {
+ // return ret
+ // }
+ // isSetTime32bitOnly.Store(true)
+ //}
var newts, oldts itimerspec32
var new32, old32 *itimerspec32