mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 06:23:16 +08:00
fix: build error
This commit is contained in:
parent
dc3e144b6a
commit
7300c917dc
@ -51,17 +51,17 @@ func findProcessName(network string, ip netip.Addr, srcPort int) (*uint32, strin
|
||||
|
||||
value, err := syscall.Sysctl(spath)
|
||||
if err != nil {
|
||||
return -1, "", err
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
buf := []byte(value)
|
||||
pid, err := defaultSearcher.Search(buf, ip, uint16(srcPort), isTCP)
|
||||
if err != nil {
|
||||
return -1, "", err
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
pp, err := getExecPathFromPID(pid)
|
||||
return -1, pp, err
|
||||
return nil, pp, err
|
||||
}
|
||||
|
||||
func getExecPathFromPID(pid uint32) (string, error) {
|
||||
|
@ -5,7 +5,7 @@ package process
|
||||
import "net/netip"
|
||||
|
||||
func findProcessName(network string, ip netip.Addr, srcPort int) (*uint32, string, error) {
|
||||
return -1, "", ErrPlatformNotSupport
|
||||
return nil, "", ErrPlatformNotSupport
|
||||
}
|
||||
|
||||
func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (uint32, uint32, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user