Skip to content

Commit

Permalink
extconf.rb: locate zstd when using homebrew (#1384)
Browse files Browse the repository at this point in the history
Fix compilation issues on my system.
  • Loading branch information
byroot authored Dec 3, 2024
1 parent 2583661 commit f0c5d11
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 f0c5d11

Please sign in to comment.