diff --git a/ext/mysql2/extconf.rb b/ext/mysql2/extconf.rb index aaf6b255..50e6795b 100644 --- a/ext/mysql2/extconf.rb +++ b/ext/mysql2/extconf.rb @@ -66,6 +66,13 @@ 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 + unless zstd_location.empty? + $LIBPATH << "#{zstd_location}/lib" + end +end + ### Find MySQL client library # borrowed from mysqlplus