]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix bug when autom4te updates too quickly
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Wed, 1 Sep 2021 00:01:47 +0000 (17:01 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 1 Sep 2021 00:35:42 +0000 (17:35 -0700)
Use stat from Time::HiRes (instead of File::stat).

Problem reported by Ionen Wolkens <https://bugs.gentoo.org/782985>.

lib/Autom4te/FileUtils.pm

index a182031b44cbbe60a3027be0eb27ddcaeb208255..27a5fd911a5362b5521cd8cc8f96a8163a3cd677 100644 (file)
@@ -34,12 +34,12 @@ This perl module provides various general purpose file handling functions.
 
 =cut
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings FATAL => 'all';
 
 use Exporter;
-use File::stat;
+use Time::HiRes qw(stat);
 use IO::File;
 
 use Autom4te::Channels;
@@ -115,10 +115,11 @@ sub mtime ($)
   return 0
     if $file eq '-' || ! -f $file;
 
-  my $stat = stat ($file)
+  my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+    $atime,$mtime,$ctime,$blksize,$blocks) = stat ($file)
     or fatal "cannot stat $file: $!";
 
-  return $stat->mtime;
+  return $mtime;
 }