diff options
author | Paul Smith <psmith@gnu.org> | 2022-10-15 18:38:18 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-10-16 16:19:42 -0400 |
commit | 72ee43c4732bb52c492cb4dd754912f6a943ae67 (patch) | |
tree | ce4dffa2c810d754b54216c72ca8b682c1c53cb4 /src/job.c | |
parent | e5e538fb7a9cb6a42dae6aa1ad9f36a3dc769ad9 (diff) | |
download | make-git-72ee43c4732bb52c492cb4dd754912f6a943ae67.tar.gz |
* src/job.c: [SV 63185] Include sys/loadavg.h if needed.
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -204,6 +204,15 @@ int getgid (); # endif #endif +#if HAVE_SYS_LOADAVG_H +# include <sys/time.h> +# include <sys/loadavg.h> +#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); |