Skip to content

Commit

Permalink
Fix building tests on High Sierra
Browse files Browse the repository at this point in the history
  • Loading branch information
CamJN authored and FooBarWidget committed Mar 28, 2018
1 parent 7abfc2e commit 26e2329
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions build/cxx_tests.rb
Expand Up @@ -124,6 +124,7 @@
[
libev_cflags,
libuv_cflags,
PlatformInfo.crypto_extra_cflags,
PlatformInfo.curl_flags,
TEST_COMMON_CFLAGS
]
Expand Down
16 changes: 13 additions & 3 deletions src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb
Expand Up @@ -29,17 +29,27 @@ module PhusionPassenger

module PlatformInfo
def self.crypto_libs
prefix = ' -framework CoreFoundation -framework Security'
suffix = ' -lcrypto'
if os_name_simple == "macosx"
return ' -framework CoreFoundation -framework Security'
if os_version < '10.13'
return prefix
else
return "#{prefix} #{openssl_extra_ldflags} #{suffix}"
end
else
return ' -lcrypto'
return suffix
end
end
memoize :crypto_libs

def self.crypto_extra_cflags
if os_name_simple == "macosx"
return ' -Wno-deprecated-declarations'
if os_version < '10.13'
return ' -Wno-deprecated-declarations'
else
return " -Wno-deprecated-declarations #{openssl_extra_cflags}"
end
else
return ''
end
Expand Down

0 comments on commit 26e2329

Please sign in to comment.