mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-24 02:31:18 -08:00
feature/androidbin: register Android cgo fallback
Enable the existing Android-safe interface fallback in cgo builds. Keep androidbin out of condregister for Android cgo applications, which provide their own interface getter; embedded consumers can opt in by importing androidbin directly. Updates #17311 Change-Id: Ia26706d9757525c1bc619935574797808b693034 Signed-off-by: Loz Brown <[email protected]>
This commit is contained in:
1 parent
87b3a5ff26
commit
678b3be66b
2 files changed
+4
-4
No files matched your search
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build (linux && !android) || (android && !cgo)
|
||||
//go:build linux || android
|
||||
|
||||
package androidbin
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"tailscale.com/net/netmon"
|
||||
)
|
||||
|
||||
// The hook is not registered in GOOS=android cgo builds (the Android
|
||||
// app), which register a Java-backed interface getter of their own.
|
||||
// Android apps may register a Java-backed interface getter. This fallback
|
||||
// is consulted only if no getter is registered and net.Interfaces fails.
|
||||
func init() {
|
||||
if !feature.Register("androidbin") {
|
||||
return
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build linux && !ts_omit_androidbin
|
||||
//go:build ((linux && !android) || (android && !cgo)) && !ts_omit_androidbin
|
||||
|
||||
package condregister
|
||||
|
||||
|
||||
Reference in new issue
Block a user