summaryrefslogtreecommitdiff
path: root/make/utilities.pm
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-08-25 13:04:17 +0100
committerPeter Powell <petpow@saberuk.com>2014-10-25 02:57:51 +0100
commita49fd4cba6a44334eb5a39c6fbe8f6cebd55d0c7 (patch)
tree706c35ce73e092c9e3b032d3cf037f5d2da1900c /make/utilities.pm
parent0035820e13a915a3bf1a440fcedf8ce25fe37a22 (diff)
Use gnutls_rnd instead of gcry_randomize on newer GnuTLS versions.
This is a modified version of 690c372. Fixes #905.
Diffstat (limited to 'make/utilities.pm')
-rw-r--r--make/utilities.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/make/utilities.pm b/make/utilities.pm
index 42dd6b547..ae16ce3dc 100644
--- a/make/utilities.pm
+++ b/make/utilities.pm
@@ -319,6 +319,15 @@ sub translate_functions($$)
die "Developers should no longer use backticks in configuration macros. Please use exec() and eval() macros instead. Offending line: $line (In module: $module)";
}
+ if ($line =~ /if(gt|lt)\("(.+?)","(.+?)"\)/) {
+ chomp(my $result = `$2 2>/dev/null`);
+ if (($1 eq 'gt' && $result le $3) || ($1 eq 'lt' && $result ge $3)) {
+ $line = substr $line, 0, $-[0];
+ } else {
+ $line =~ s/if$1\("$2","$3"\)//;
+ }
+ }
+
if ($line =~ /ifuname\(\!"(\w+)"\)/)
{
my $uname = $1;