summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-11 16:29:40 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-11 16:29:40 -0800
commitf15b8097a00299291263cfe64947942564ccc373 (patch)
treeff42338380d935285caf81337ac8607ce26a915b
parentde7b5bb18da4e5a626794db292f8b41d30aa2232 (diff)
Use autoconf to check for <protocols/rwhod.h> instead of OS-specific ifdefs
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac2
-rw-r--r--get_rload.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index fa66a66..7134af7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,7 +72,7 @@ AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
# BSD & GNU libc use <stdlib.h>, Solaris requires <sys/loadavg.h>
AC_CHECK_FUNCS([getloadavg], [AC_CHECK_HEADERS([sys/loadavg.h])])
-AC_CHECK_HEADERS([paths.h])
+AC_CHECK_HEADERS([paths.h protocols/rwhod.h])
# Checks for pkg-config packages
PKG_CHECK_MODULES(XLOAD, xaw7 xmu xt x11 [xproto >= 7.0.17])
diff --git a/get_rload.c b/get_rload.c
index fd0f326..64e4a3e 100644
--- a/get_rload.c
+++ b/get_rload.c
@@ -12,7 +12,7 @@
/* Not all OS supports get_rload
steal the STUB idea from get_load
*/
-#if defined(__CYGWIN__) || defined(_WIN32)
+#ifndef HAVE_PROTOCOLS_RWHOD_H
#define RLOADSTUB
#endif