Fix build using Darwin and osxcross
This commit is contained in:
committed by
Cristian Maglie
parent
0d8c7bfd78
commit
51237629e6
@@ -22,14 +22,14 @@ func nativeGetDetailedPortsList() ([]*PortDetails, error) {
|
||||
|
||||
services, err := getAllServices("IOSerialBSDClient")
|
||||
if err != nil {
|
||||
return nil, &PortError{code: ErrorEnumeratingPorts, causedBy: err}
|
||||
return nil, &PortEnumerationError{causedBy: err}
|
||||
}
|
||||
for _, service := range services {
|
||||
defer service.Release()
|
||||
|
||||
port, err := extractPortInfo(C.io_registry_entry_t(service))
|
||||
if err != nil {
|
||||
return nil, &PortError{code: ErrorEnumeratingPorts, causedBy: err}
|
||||
return nil, &PortEnumerationError{causedBy: err}
|
||||
}
|
||||
ports = append(ports, port)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user