From 219de06186b5c1df0f330d614c853aff36668c63 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 27 Aug 2018 14:18:10 +0200 Subject: [PATCH] Fixed darwin build for go1.10+ --- enumerator/usb_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enumerator/usb_darwin.go b/enumerator/usb_darwin.go index c72a19a..4fcd4dc 100644 --- a/enumerator/usb_darwin.go +++ b/enumerator/usb_darwin.go @@ -112,7 +112,7 @@ func serviceMatching(serviceType string) C.CFMutableDictionaryRef { // getMatchingServices look up registered IOService objects that match a matching dictionary. func getMatchingServices(matcher C.CFMutableDictionaryRef) (C.io_iterator_t, error) { var i C.io_iterator_t - err := C.IOServiceGetMatchingServices(C.kIOMasterPortDefault, matcher, &i) + err := C.IOServiceGetMatchingServices(C.kIOMasterPortDefault, C.CFDictionaryRef(matcher), &i) if err != C.KERN_SUCCESS { return 0, fmt.Errorf("IOServiceGetMatchingServices failed (code %d)", err) }