comparison m4/stdlib_h.m4 @ 39240:26058d7353f4

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.
author Bruno Haible <bruno@clisp.org>
date Sat, 03 Feb 2018 14:05:45 +0100
parents 24e347e0e326
children b06060465f09
comparison
equal deleted inserted replaced
39239:31d885413cfb 39240:26058d7353f4
1 # stdlib_h.m4 serial 44 1 # stdlib_h.m4 serial 45
2 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. 2 dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation 3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it, 4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved. 5 dnl with or without modifications, as long as this notice is preserved.
6 6
12 dnl Check for declarations of anything we want to poison if the 12 dnl Check for declarations of anything we want to poison if the
13 dnl corresponding gnulib module is not in use, and which is not 13 dnl corresponding gnulib module is not in use, and which is not
14 dnl guaranteed by C89. 14 dnl guaranteed by C89.
15 gl_WARN_ON_USE_PREPARE([[#include <stdlib.h> 15 gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
16 #if HAVE_SYS_LOADAVG_H 16 #if HAVE_SYS_LOADAVG_H
17 /* OpenIndiana has a bug: <sys/time.h> must be included before
18 <sys/loadavg.h>. */
19 # include <sys/time.h>
17 # include <sys/loadavg.h> 20 # include <sys/loadavg.h>
18 #endif 21 #endif
19 #if HAVE_RANDOM_H 22 #if HAVE_RANDOM_H
20 # include <random.h> 23 # include <random.h>
21 #endif 24 #endif