[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c-stack sys/resource.h [was: m4-1.4.11.34-9ecd build feedback]
From: |
Eric Blake |
Subject: |
c-stack sys/resource.h [was: m4-1.4.11.34-9ecd build feedback] |
Date: |
Tue, 19 Aug 2008 21:39:09 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[adding bug-gnulib]
According to Eric Blake on 8/10/2008 9:46 PM:
> According to Nelson H. F. Beebe on 8/7/2008 11:20 AM:
> =======
> Nelson reported a build failure on a FreeBSD 5.0 machine:
[the report was off-list, because it included other information in the log
that Nelson did not want public]
>
> | In file included from test-c-stack.c:25:
> | /usr/include/sys/resource.h:61: error: field `ru_utime' has incomplete
> type
> | /usr/include/sys/resource.h:62: error: field `ru_stime' has incomplete
> type
> | make[5]: *** [test-c-stack.o] Error 1
>
> Meanwhile, do you know which header must be included prior to
> <sys/resource.h> in order to get ru_[us]time defined properly?
At any rate, looking at m4/c-stack.m4 and m4/printf.m4, it looks like both
<sys/types.h> and <sys/time.h> are prerequisites to successfully using
<sys/resource.h>, so I'm applying this.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkirkd0ACgkQ84KuGfSFAYDW0wCgrlsOpWWejWG8msmUPBpz0YQ2
MaYAnAhqS4v/uCCbCrMkyizzc7nFJi3W
=419y
-----END PGP SIGNATURE-----
>From ae3a0d62f26d8156b403e40d6007475006f3136f Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 19 Aug 2008 21:36:21 -0600
Subject: [PATCH] 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.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 7 +++++++
doc/posix-headers/sys_resource.texi | 5 +++++
tests/test-c-stack.c | 4 ++++
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6008e52..3460235 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-08-19 Eric Blake <address@hidden>
+ 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.
diff --git a/doc/posix-headers/sys_resource.texi
b/doc/posix-headers/sys_resource.texi
index e6f387f..53d74ca 100644
--- a/doc/posix-headers/sys_resource.texi
+++ b/doc/posix-headers/sys_resource.texi
@@ -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.
+
address@hidden
This header file is missing on some platforms:
mingw.
@end itemize
diff --git a/tests/test-c-stack.c b/tests/test-c-stack.c
index c1600a5..fe782c9 100644
--- a/tests/test-c-stack.c
+++ b/tests/test-c-stack.c
@@ -22,6 +22,10 @@
#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
--
1.5.6.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- c-stack sys/resource.h [was: m4-1.4.11.34-9ecd build feedback],
Eric Blake <=