From fedff97c96ec7f7866fa15bd38b9a349cf260cad Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 13 Mar 2025 23:51:51 +0100 Subject: improved includes and some comments --- plugins/check_load.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'plugins/check_load.c') diff --git a/plugins/check_load.c b/plugins/check_load.c index 57be8c69..5d3e6237 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c @@ -28,28 +28,24 @@ * *****************************************************************************/ -#include "output.h" -#include "perfdata.h" -#include "thresholds.h" const char *progname = "check_load"; const char *copyright = "1999-2022"; const char *email = "devel@monitoring-plugins.org"; #include "./common.h" +#include #include "./runcmd.h" #include "./utils.h" #include "./popen.h" -#include "states.h" +#include "../lib/states.h" +#include "../lib/output.h" +#include "../lib/perfdata.h" +#include "../lib/thresholds.h" #include "check_load.d/config.h" +// getloadavg comes from gnulib #include "../gl/stdlib.h" -#include - -#ifdef HAVE_SYS_LOADAVG_H -# include -#endif - /* needed for compilation under NetBSD, as suggested by Andy Doran */ #ifndef LOADAVG_1MIN # define LOADAVG_1MIN 0 @@ -136,6 +132,7 @@ int main(int argc, char **argv) { double load_values[3] = {0, 0, 0}; + // this should be getloadavg from gnulib, should work everywhere™ int error = getloadavg(load_values, 3); if (error != 3) { die(STATE_UNKNOWN, _("Failed to retrieve load values")); -- cgit v1.2.3-74-g34f1