Skip to content

Commit

Permalink
fix: circular reference problem
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynxg committed Aug 28, 2023
1 parent a64399c commit ad4f8ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/syscall/netlink_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
package syscall

import (
"os"
err2 "errors"
"io/fs"
"runtime"
"sync"
"unsafe"
Expand Down Expand Up @@ -68,7 +69,7 @@ func NetlinkRIB(proto, family int) ([]byte, error) {
sa := &SockaddrNetlink{Family: AF_NETLINK}
if err := Bind(s, sa); err != nil {
// Bind operation of Netlink socket is prohibited in Android11 and later versions
if !(runtime.GOOS == "android" && os.IsPermission(err)) {
if !(runtime.GOOS == "android" && err2.Is(err, fs.ErrPermission)) {
return nil, err
}
}
Expand Down

0 comments on commit ad4f8ff

Please sign in to comment.