buildworld failing at kdump_subr.c (SEEK_HOLE and SEEK_DATA)

David Taylor davidt at yadt.co.uk
Tue Aug 21 10:50:01 PDT 2007


Hi,

I'm having a problem compiling world, and I don't quite understand
why it hasn't broken the world build for everyone.  But anyway.

The build is failing in usr.bin/kdump/ compiling kdump_subr.c.

This file is generated by usr.bin/kdump/mksubr.  The first line
in this file is "#include <stdio.h>".  Shortly afterwards it
includes <sys/unistd.h>.

The build fails as SEEK_HOLE and SEEK_DATA are undefined.

This is because <stdio.h> is defining SEEK_SET, SEEK_CUR, and SEEK_END.
As a result, <sys/unistd.h> is not defining SEEK_<anything>, as
SEEK_SET is already defined.

I appear to have successfully worked around the problem by removing
from kdump_subr.c the include of <stdio.h> (which is presumably included
again implicitly at some point after <sys/unistd.h>, as I get no warnings
about the use of stdio functions.

As I said, I don't understand how everyone else is successfully compiling
kdump, but as there's no screaming, I assume they are...

-- 
David Taylor


More information about the freebsd-current mailing list