Skip to content

Commit 73f3397

Browse files
author
WEI LIU
committed
fix: circular reference problem
1 parent a64399c commit 73f3397

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/syscall/netlink_linux.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
package syscall
88

99
import (
10-
"os"
10+
errors2 "errors"
11+
"io/fs"
1112
"runtime"
1213
"sync"
1314
"unsafe"
@@ -68,7 +69,7 @@ func NetlinkRIB(proto, family int) ([]byte, error) {
6869
sa := &SockaddrNetlink{Family: AF_NETLINK}
6970
if err := Bind(s, sa); err != nil {
7071
// Bind operation of Netlink socket is prohibited in Android11 and later versions
71-
if !(runtime.GOOS == "android" && os.IsPermission(err)) {
72+
if !(runtime.GOOS == "android" && errors2.Is(err, fs.ErrPermission)) {
7273
return nil, err
7374
}
7475
}

0 commit comments

Comments
 (0)