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 2, 2024
1 parent 2583661 commit 374589a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/mysql2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ def add_ssl_defines(header)
$LDFLAGS << " -L#{openssl_location}/lib" if openssl_location
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

# borrowed from mysqlplus
Expand Down

0 comments on commit 374589a

Please sign in to comment.