Compilation of coreutils-4.5.7 on Apple Darwin 6.3 (MacOS 10.2.3)
failed like this:
if gcc -DLIBDIR=\"/usr/local/lib\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.
-I/usr/local/include -g -O2 -MT ftw.o -MD -MP -MF ".deps/ftw.Tpo" \
-c -o ftw.o `test -f 'ftw.c' || echo './'`ftw.c; \
then mv ".deps/ftw.Tpo" ".deps/ftw.Po"; \
else rm -f ".deps/ftw.Tpo"; exit 1; \
fi
In file included from /usr/include/dirent.h:64,
from ftw.c:44:
/usr/include/sys/dirent.h:73: parse error before "u_int32_t"
/usr/include/sys/dirent.h:75: parse error before "d_type"
/usr/include/sys/dirent.h:76: parse error before "d_namlen"
/usr/include/sys/dirent.h:83: parse error before '}' token
ftw.c: In function `open_dir_stream':
ftw.c:283: dereferencing pointer to incomplete type
ftw.c:301: dereferencing pointer to incomplete type
ftw.c: In function `ftw_dir':
ftw.c:538: dereferencing pointer to incomplete type
ftw.c:538: dereferencing pointer to incomplete type
make[3]: *** [ftw.o] Error 1
The fix is simple: <sys/types.h> is needed:
% diff -c lib/ftw.c.~1~ lib/ftw.c
*** lib/ftw.c.~1~ Sat Feb 8 11:18:20 2003
--- lib/ftw.c Wed Feb 19 06:16:39 2003
***************
*** 36,41 ****
--- 36,43 ----
# endif
#endif
+ # include <sys/types.h>
+
#if defined _LIBC
# include <dirent.h>
# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent)
With that patch applied, all tests pass successfully (the build was
with gcc-3.2.2).
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- Center for Scientific Computing FAX: +1 801 581 4148 -
- University of Utah Internet e-mail: [EMAIL PROTECTED] -
- Department of Mathematics, 110 LCB [EMAIL PROTECTED] [EMAIL PROTECTED] -
- 155 S 1400 E RM 233 [EMAIL PROTECTED] -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe -
-------------------------------------------------------------------------------
_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils