Skip to content

Commit f0c5d11

Browse files
authored
extconf.rb: locate zstd when using homebrew (#1384)
Fix compilation issues on my system.
1 parent 2583661 commit f0c5d11

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/mysql2/extconf.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ def add_ssl_defines(header)
6363
# Homebrew OpenSSL on MacOS
6464
elsif RUBY_PLATFORM =~ /darwin/ && system('command -v brew')
6565
openssl_location = `brew --prefix openssl`.strip
66-
$LDFLAGS << " -L#{openssl_location}/lib" if openssl_location
66+
$LIBPATH << "#{openssl_location}/lib" unless openssl_location.empty?
67+
end
68+
69+
if RUBY_PLATFORM =~ /darwin/ && system('command -v brew')
70+
zstd_location = `brew --prefix zstd`.strip
71+
$LIBPATH << "#{zstd_location}/lib" unless zstd_location.empty?
6772
end
6873

6974
### Find MySQL client library

0 commit comments

Comments
 (0)