diff --git a/hidapi/mac/hid.c b/hidapi/mac/hid.c index 58ba49b..be1491f 100644 --- a/hidapi/mac/hid.c +++ b/hidapi/mac/hid.c @@ -303,7 +303,11 @@ static io_service_t hidapi_IOHIDDeviceGetService(IOHIDDeviceRef device) * and the fallback method will be used. */ if (iokit_framework == NULL) { - iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY); + iokit_framework = dlopen("/System/Library/Frameworks/IOKit.framework/IOKit", RTLD_LAZY); + + if (iokit_framework == NULL) { + iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY); + } if (iokit_framework != NULL) dynamic_IOHIDDeviceGetService = dlsym(iokit_framework, "IOHIDDeviceGetService");