diff --git a/lib/ffi/library.rb b/lib/ffi/library.rb index c6f965445..1f8602b95 100644 --- a/lib/ffi/library.rb +++ b/lib/ffi/library.rb @@ -126,7 +126,7 @@ def ffi_lib(*names) else # TODO better library lookup logic unless libname.start_with?("/") || FFI::Platform.windows? - path = ['/usr/lib/','/usr/local/lib/','/opt/local/lib/'].find do |pth| + path = ['/usr/lib/','/usr/local/lib/','/opt/local/lib/', '/opt/homebrew/lib/'].find do |pth| File.exist?(pth + libname) end if path