]> git.ipfire.org Git - thirdparty/make.git/commitdiff
[SV 63236] Fix getloadavg related error message on AIX
authorDmitry Goncharov <dgoncharov@users.sf.net>
Fri, 21 Oct 2022 23:32:06 +0000 (19:32 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 22 Oct 2022 13:45:40 +0000 (09:45 -0400)
On AIX getloadavg keeps errno intact when it fails, resulting in a
bogus error message from make.

* src/job.c (load_too_high): Reset errno before calling getloadavg.

src/job.c

index cf16d7bf669c08ebfee212efca03d2bb5700d659..9d38190485d7f636fa275806785ecd93a477492a 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -2092,6 +2092,7 @@ load_too_high (void)
     }
 
   /* Find the real system load average.  */
+  errno = 0;
   if (getloadavg (&load, 1) != 1)
     {
       static int lossage = -1;