# HG changeset patch # User Bruno Haible # Date 1517663145 -3600 # Node ID 26058d7353f46b7ccf233f9b41d9ec4de5a8f862 # Parent 31d885413cfbdfb3d2232bcd5e92f58cdaa21cf1 stdlib: Fix compilation error on OpenIndiana. * lib/stdlib.in.h: Before including , include . * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise. * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise. diff -r 31d885413cfb -r 26058d7353f4 ChangeLog --- a/ChangeLog Sat Feb 03 12:50:17 2018 +0100 +++ b/ChangeLog Sat Feb 03 14:05:45 2018 +0100 @@ -1,3 +1,11 @@ +2018-02-03 Bruno Haible + + stdlib: Fix compilation error on OpenIndiana. + * lib/stdlib.in.h: Before including , include + . + * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise. + * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise. + 2018-02-03 Bruno Haible host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana. diff -r 31d885413cfb -r 26058d7353f4 lib/stdlib.in.h --- a/lib/stdlib.in.h Sat Feb 03 12:50:17 2018 +0100 +++ b/lib/stdlib.in.h Sat Feb 03 14:05:45 2018 +0100 @@ -47,6 +47,9 @@ /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ +/* OpenIndiana has a bug: must be included before + . */ +# include # include #endif diff -r 31d885413cfb -r 26058d7353f4 m4/getloadavg.m4 --- a/m4/getloadavg.m4 Sat Feb 03 12:50:17 2018 +0100 +++ b/m4/getloadavg.m4 Sat Feb 03 14:05:45 2018 +0100 @@ -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 @@ fi AC_CHECK_DECL([getloadavg], [], [HAVE_DECL_GETLOADAVG=0], [[#if HAVE_SYS_LOADAVG_H + /* OpenIndiana has a bug: must be included before + . */ + # include # include #endif #include ]]) diff -r 31d885413cfb -r 26058d7353f4 m4/stdlib_h.m4 --- a/m4/stdlib_h.m4 Sat Feb 03 12:50:17 2018 +0100 +++ b/m4/stdlib_h.m4 Sat Feb 03 14:05:45 2018 +0100 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 44 +# stdlib_h.m4 serial 45 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -14,6 +14,9 @@ dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H +/* OpenIndiana has a bug: must be included before + . */ +# include # include #endif #if HAVE_RANDOM_H