From 6762424e2471e3e4f9ba9b6bb883d08911d352fb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 12 Sep 2012 10:41:17 -0400 Subject: Compatibility fix for WWW::Curl < 4.14 Older versions of WWW::Curl don't support scalar references for CURLOPT_WRITEDATA directly. http://hydra.nixos.org/build/3017188 --- scripts/download-from-binary-cache.pl.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/download-from-binary-cache.pl.in') diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index 335d7d9706fd..f16434d0a391 100644 --- a/scripts/download-from-binary-cache.pl.in +++ b/scripts/download-from-binary-cache.pl.in @@ -40,7 +40,8 @@ sub addRequest { $curl->setopt(CURLOPT_PRIVATE, $curlId); $curl->setopt(CURLOPT_URL, $url); - $curl->setopt(CURLOPT_WRITEDATA, \$requests{$curlId}->{content}); + open (my $fh, ">", \$requests{$curlId}->{content}); + $curl->setopt(CURLOPT_WRITEDATA, $fh); $curl->setopt(CURLOPT_FOLLOWLOCATION, 1); $curl->setopt(CURLOPT_CAINFO, $caBundle) if defined $caBundle; $curl->setopt(CURLOPT_USERAGENT, "Nix/$Nix::Config::version"); -- cgit 1.4.1