fix(dialer): split netns into platform file to support android cross-compile

This commit is contained in:
ginuerzh
2026-06-15 16:50:44 +08:00
parent 3b3eaa609a
commit 81dc9331b8
3 changed files with 63 additions and 23 deletions
+11
View File
@@ -0,0 +1,11 @@
//go:build android
package dialer
import "fmt"
// switchNetns is a no-op stub — network namespace switching is not supported
// on Android (requires privileged kernel syscalls unavailable to app sandboxes).
func switchNetns(name string) (restore func(), err error) {
return nil, fmt.Errorf("netns not supported on android")
}