summaryrefslogtreecommitdiff
path: root/ext/digest/sha2
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-21 12:25:29 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-21 12:25:29 +0000
commitc50c9f6d3ba1f9b550c68777569f7d3f8898446f (patch)
treee489da721e365e61d5b6e0ae6942406954430b01 /ext/digest/sha2
parent4131d6176ac46da95b1e7fa045651783f0a66c65 (diff)
* ext/digest/sha2/extconf.rb: check SHA256_CTX and SHA512_CTX to fix
compilation failure on OpenBSD 4.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/sha2')
-rw-r--r--ext/digest/sha2/extconf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb
index d4af8702aa..a8f0198cf0 100644
--- a/ext/digest/sha2/extconf.rb
+++ b/ext/digest/sha2/extconf.rb
@@ -12,7 +12,8 @@ dir_config("openssl")
if !with_config("bundled-sha2") &&
have_library("crypto") &&
- %w[SHA256 SHA512].all? {|d| have_func("#{d}_Transform", "openssl/sha.h")}
+ %w[SHA256 SHA512].all? {|d| have_func("#{d}_Transform", "openssl/sha.h")} &&
+ %w[SHA256 SHA512].all? {|d| have_type("#{d}_CTX", "openssl/sha.h")}
$objs << "sha2ossl.#{$OBJEXT}"
$defs << "-DSHA2_USE_OPENSSL"
else