From: Paul Smith Date: Sat, 15 Oct 2022 22:38:18 +0000 (-0400) Subject: * src/job.c: [SV 63185] Include sys/loadavg.h if needed. X-Git-Tag: 4.3.91~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72ee43c4732bb52c492cb4dd754912f6a943ae67;p=thirdparty%2Fmake.git * src/job.c: [SV 63185] Include sys/loadavg.h if needed. --- diff --git a/src/job.c b/src/job.c index 19f27977..a47824a7 100644 --- a/src/job.c +++ b/src/job.c @@ -204,6 +204,15 @@ int getgid (); # endif #endif +#if HAVE_SYS_LOADAVG_H +# include +# include +#endif + +#ifndef HAVE_DECL_GETLOADAVG +int getloadavg (double loadavg[], int nelem); +#endif + /* Different systems have different requirements for pid_t. Plus we have to support gettext string translation... Argh. */ static const char * @@ -220,10 +229,6 @@ pid2str (pid_t pid) return pidstring; } -#ifndef HAVE_DECL_GETLOADAVG -int getloadavg (double loadavg[], int nelem); -#endif - static void free_child (struct child *); static void start_job_command (struct child *child); static int load_too_high (void);