summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorRichard Bradfield <bradfirj@fstab.me>2015-07-22 01:18:03 +0100
committerRichard Bradfield <bradfirj@fstab.me>2015-07-22 01:18:03 +0100
commit79d1a436bb5c7ab40e43130495c455ffc8c682a2 (patch)
treef831440697316e2fb8d01825bc66d3886c69b9d6 /make
parent539abb9e93e9657c136759116379f7182c78ea8c (diff)
Replace deprecated tmpnam() call
From Perl 5.22 onwards, POSIX::tmpnam() has been deprecated (without the usual 2 year deprecation cycle), using the File::Temp module instead preserves compatibility while allowing compilation on 5.22 and later.
Diffstat (limited to 'make')
-rw-r--r--make/utilities.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/make/utilities.pm b/make/utilities.pm
index ae16ce3dc..baba584ad 100644
--- a/make/utilities.pm
+++ b/make/utilities.pm
@@ -29,6 +29,7 @@ use warnings FATAL => qw(all);
use Exporter 'import';
use POSIX;
+use File::Temp;
use Getopt::Long;
use Fcntl;
our @EXPORT = qw(make_rpath pkgconfig_get_include_dirs pkgconfig_get_lib_dirs pkgconfig_check_version translate_functions promptstring);
@@ -404,7 +405,7 @@ sub translate_functions($$)
my $tmpfile;
do
{
- $tmpfile = tmpnam();
+ $tmpfile = File::Temp::tmpnam();
} until sysopen(TF, $tmpfile, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0700);
print "(Created and executed \e[1;32m$tmpfile\e[0m)\n";
print TF $1;