http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58274
Bug ID: 58274 Summary: libiberty/stack-limit.c: bootstrap failure due to missing FreeBSD header Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: skunk at iskunk dot org Host: i386-unknown-freebsd4.8 Target: i386-unknown-freebsd4.8 Build: i386-unknown-freebsd4.8 Created attachment 30724 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30724&action=edit Patch against 4.8.1/SVN This is basically the same as bug 49817, only this occurs on FreeBSD 4.8, which doesn't have <stdint.h>. (This is clearly a bug in the FreeBSD headers, but this version of the OS won't be seeing a fix.) [...] if [ x"-fpic" != x ]; then \ tg-gcc -c -DHAVE_CONFIG_H -g -I. -I/home/src/gcc-4.8.1/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -fpic /home/src/gcc-4.8.1/libiberty/stack-limit.c -o pic/stack-limit.o; \ else true; fi In file included from /home/src/gcc-4.8.1/libiberty/stack-limit.c:43: /usr/include/sys/resource.h:58: error: field 'ru_utime' has incomplete type /usr/include/sys/resource.h:59: error: field 'ru_stime' has incomplete type /usr/include/sys/resource.h:119: error: expected specifier-qualifier-list before 'int32_t' /usr/include/sys/resource.h:124: error: expected specifier-qualifier-list before 'rlim_t' /usr/include/sys/resource.h:130: error: expected specifier-qualifier-list before 'fixpt_t' /home/src/gcc-4.8.1/libiberty/stack-limit.c: In function 'stack_limit_increase': /home/src/gcc-4.8.1/libiberty/stack-limit.c:53: error: 'struct rlimit' has no member named 'rlim_cur' /home/src/gcc-4.8.1/libiberty/stack-limit.c:53: error: 'rlim_t' undeclared (first use in this function) /home/src/gcc-4.8.1/libiberty/stack-limit.c:53: error: (Each undeclared identifier is reported only once /home/src/gcc-4.8.1/libiberty/stack-limit.c:53: error: for each function it appears in.) /home/src/gcc-4.8.1/libiberty/stack-limit.c:53: error: 'u_quad_t' undeclared (first use in this function) /home/src/gcc-4.8.1/libiberty/stack-limit.c:53: error: expected ')' before numeric constant /home/src/gcc-4.8.1/libiberty/stack-limit.c:54: error: 'struct rlimit' has no member named 'rlim_cur' /home/src/gcc-4.8.1/libiberty/stack-limit.c:55: error: 'struct rlimit' has no member named 'rlim_max' /home/src/gcc-4.8.1/libiberty/stack-limit.c:55: error: expected ')' before numeric constant /home/src/gcc-4.8.1/libiberty/stack-limit.c:55: error: 'struct rlimit' has no member named 'rlim_cur' /home/src/gcc-4.8.1/libiberty/stack-limit.c:55: error: 'struct rlimit' has no member named 'rlim_max' /home/src/gcc-4.8.1/libiberty/stack-limit.c:57: error: 'struct rlimit' has no member named 'rlim_cur' /home/src/gcc-4.8.1/libiberty/stack-limit.c:58: error: 'struct rlimit' has no member named 'rlim_max' /home/src/gcc-4.8.1/libiberty/stack-limit.c:58: error: expected ')' before numeric constant /home/src/gcc-4.8.1/libiberty/stack-limit.c:58: error: 'struct rlimit' has no member named 'rlim_cur' /home/src/gcc-4.8.1/libiberty/stack-limit.c:58: error: 'struct rlimit' has no member named 'rlim_max' /home/src/gcc-4.8.1/libiberty/stack-limit.c:59: error: 'struct rlimit' has no member named 'rlim_cur' /home/src/gcc-4.8.1/libiberty/stack-limit.c:59: error: 'struct rlimit' has no member named 'rlim_max' gmake[3]: *** [stack-limit.o] Error 1 #Including <sys/time.h> fixes the issue. See attached patch.