test-c-stack: fix compilation failure on FreeBSD 5.0
authorEric Blake <ebb9@byu.net>
Wed, 20 Aug 2008 03:36:21 +0000 (21:36 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 20 Aug 2008 03:36:21 +0000 (21:36 -0600)
* tests/test-c-stack.c [HAVE_SETRLIMIT]: Include prerequisite
headers before <sys/resource.h>.
* doc/posix-headers/sys_resource.texi (sys/resource.h): Document
the bug.
Reported by Nelson H. F. Beebe.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/posix-headers/sys_resource.texi
tests/test-c-stack.c

index 6008e52..3460235 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-08-19  Eric Blake  <ebb9@byu.net>
 
+       test-c-stack: fix compilation failure on FreeBSD 5.0
+       * tests/test-c-stack.c [HAVE_SETRLIMIT]: Include prerequisite
+       headers before <sys/resource.h>.
+       * doc/posix-headers/sys_resource.texi (sys/resource.h): Document
+       the bug.
+       Reported by Nelson H. F. Beebe.
+
        strverscmp: migrate from "strverscmp.h" to <string.h>
        * modules/string (Makefile.am): Add new hooks.
        * modules/strverscmp (Files): Remove strverscmp.h.
index e6f387f..53d74ca 100644 (file)
@@ -12,6 +12,11 @@ Portability problems fixed by Gnulib:
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+On some platforms, this header file requires that <sys/types.h> and
+<sys/time.h> already be included:
+FreeBSD 5.0.
+
+@item
 This header file is missing on some platforms:
 mingw.
 @end itemize
index c1600a5..fe782c9 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #if HAVE_SETRLIMIT
+/* At least FreeBSD 5.0 needs extra headers before <sys/resource.h>
+   will compile.  */
+# include <sys/types.h>
+# include <sys/time.h>
 # include <sys/resource.h>
 #endif