buildworld failing at kdump_subr.c (SEEK_HOLE and SEEK_DATA)

From: David Taylor <davidt_at_yadt.co.uk>
Date: Tue, 21 Aug 2007 18:49:36 +0100
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
Received on Tue Aug 21 2007 - 15:50:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC