From 13226e828c6b7d56c77444afe159c1ccf008d62d Mon Sep 17 00:00:00 2001 From: ng0 Date: Wed, 20 Nov 2019 13:28:01 +0000 Subject: follow-up to 7c14b80a011e9e99b1cef0bfd96bae364edd5663: use __linux__ instead of redefined LINUX. --- src/testbed/gnunet-service-testbed_cpustatus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/testbed') diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index 5eaeaf952..cd1878467 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c @@ -57,7 +57,7 @@ static processor_cpu_load_info_t prev_cpu_load; #define DEBUG_STATUSCALLS GNUNET_NO -#ifdef LINUX +#ifdef __linux__ static FILE *proc_stat; #endif @@ -133,7 +133,7 @@ updateUsage () { currentIOLoad = -1; currentCPULoad = -1; -#ifdef LINUX +#ifdef __linux__ /* under linux, first try %idle/usage using /proc/stat; if that does not work, disable /proc/stat for the future by closing the file and use the next-best method. */ @@ -509,7 +509,7 @@ mem_get_usage () } -#ifdef LINUX +#ifdef __linux__ #include /** * Returns the number of processes @@ -557,7 +557,7 @@ sample_load_task (void *cls) if ((-1 == ld_cpu) || (-1 == ld_disk)) goto reschedule; mem_usage = mem_get_usage (); -#ifdef LINUX +#ifdef __linux__ nproc = get_nproc (); #else nproc = 0; @@ -622,7 +622,7 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) } GNUNET_free (fn); sample_load_task_id = GNUNET_SCHEDULER_add_now (&sample_load_task, NULL); -#ifdef LINUX +#ifdef __linux__ proc_stat = fopen ("/proc/stat", "r"); if (NULL == proc_stat) GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, @@ -642,7 +642,7 @@ GST_stats_destroy () { if (NULL == bw) return; -#ifdef LINUX +#ifdef __linux__ if (proc_stat != NULL) { fclose (proc_stat); -- cgit v1.2.3