summaryrefslogtreecommitdiff
path: root/m4/getloadavg.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2018-02-03 14:05:45 +0100
committerBruno Haible <bruno@clisp.org>2018-02-03 14:05:45 +0100
commitab4b1f3d4e517a0948fce56d6c0ac0995fd5133b (patch)
treec313635c9b75a1345aa708d45d03cfd5af4818ca /m4/getloadavg.m4
parente017871121364b67549ea00fcfebc0cb6cc99fb3 (diff)
downloadgnulib-ab4b1f3d4e517a0948fce56d6c0ac0995fd5133b.tar.gz
stdlib: Fix compilation error on OpenIndiana.
* lib/stdlib.in.h: Before including <sys/loadavg.h>, include <sys/time.h>. * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise. * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
Diffstat (limited to 'm4/getloadavg.m4')
-rw-r--r--m4/getloadavg.m45
1 files changed, 4 insertions, 1 deletions
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index acc266531e..7b6a09a5c5 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -7,7 +7,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 6
+#serial 7
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
# New applications should use gl_GETLOADAVG instead.
@@ -92,6 +92,9 @@ else
fi
AC_CHECK_DECL([getloadavg], [], [HAVE_DECL_GETLOADAVG=0],
[[#if HAVE_SYS_LOADAVG_H
+ /* OpenIndiana has a bug: <sys/time.h> must be included before
+ <sys/loadavg.h>. */
+ # include <sys/time.h>
# include <sys/loadavg.h>
#endif
#include <stdlib.h>]])