Skip to content

Commit

Permalink
OpenSSL: Hide errors when either libcrypto or libssl are not found by…
Browse files Browse the repository at this point in the history
… pkg-config (crystal-lang#5603)
  • Loading branch information
waj authored and RX14 committed Jan 18, 2018
1 parent f3168b6 commit 3b50388
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/openssl/lib_crypto.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
end
{% end %}

@[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs libcrypto || printf %s '-lcrypto'`")]
@[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'`")]
lib LibCrypto
alias Char = LibC::Char
alias Int = LibC::Int
Expand Down
2 changes: 1 addition & 1 deletion src/openssl/lib_ssl.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require "./lib_crypto"
end
{% end %}

@[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs libssl || printf %s '-lssl -lcrypto'`")]
@[Link(ldflags: "`command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'`")]
lib LibSSL
alias Int = LibC::Int
alias Char = LibC::Char
Expand Down

0 comments on commit 3b50388

Please sign in to comment.