mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 14:18:36 +00:00
Replace deprecated syscall.RouteRIB in darwin power report
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"sync"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/net/route"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -100,7 +102,7 @@ func readClocks() (absoluteTime int64, continuousTime int64) {
|
||||
}
|
||||
|
||||
func readInterfaceCounters() map[string]interfaceCounters {
|
||||
table, err := syscall.RouteRIB(syscall.NET_RT_IFLIST2, 0)
|
||||
table, err := route.FetchRIB(syscall.AF_UNSPEC, syscall.NET_RT_IFLIST2, 0)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user