Skip to content

Commit

Permalink
extconf.rb: locate zstd when using homebrew
Browse files Browse the repository at this point in the history
Fix compilation issues on my system.
  • Loading branch information
byroot committed Dec 3, 2024
1 parent 2583661 commit 9a28bef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ext/mysql2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ def add_ssl_defines(header)
# Homebrew OpenSSL on MacOS
elsif RUBY_PLATFORM =~ /darwin/ && system('command -v brew')
openssl_location = `brew --prefix openssl`.strip
$LDFLAGS << " -L#{openssl_location}/lib" if openssl_location
$LIBPATH << "#{openssl_location}/lib" unless openssl_location.empty?
end

if RUBY_PLATFORM =~ /darwin/ && system('command -v brew')
zstd_location = `brew --prefix zstd`.strip
$LIBPATH << "#{zstd_location}/lib" unless zstd_location.empty?
end

### Find MySQL client library
Expand Down

0 comments on commit 9a28bef

Please sign in to comment.