android: Add workaround for tailscale pidfd crash
This commit is contained in:
parent
2dcb86941f
commit
0a63049845
2 changed files with 21 additions and 0 deletions
|
|
@ -112,6 +112,8 @@ func buildAndroid() {
|
|||
args = append(args, debugFlags...)
|
||||
}
|
||||
|
||||
args = append(args, "-ldflags", "-checklinkname=0")
|
||||
|
||||
tags := append(sharedTags, memcTags...)
|
||||
if debugEnabled {
|
||||
tags = append(tags, debugTags...)
|
||||
|
|
|
|||
19
experimental/libbox/pidfd_android.go
Normal file
19
experimental/libbox/pidfd_android.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package libbox
|
||||
|
||||
import (
|
||||
"os"
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
// https://github.com/SagerNet/sing-box/issues/3233
|
||||
// https://github.com/golang/go/issues/70508
|
||||
// https://github.com/tailscale/tailscale/issues/13452
|
||||
|
||||
//go:linkname checkPidfdOnce os.checkPidfdOnce
|
||||
var checkPidfdOnce func() error
|
||||
|
||||
func init() {
|
||||
checkPidfdOnce = func() error {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue