kdebase vs. linux headers

Greg Schafer gschafer at zip.com.au
Thu Oct 5 14:29:46 PDT 2006

Matthew Burgess wrote:

> The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
> It just so happens that the compilation of kdebase uses the -ansi 
> switch, hence the compilation problem.  Now, I still don't know what the 
> correct solution is.  Do we just kill the -ansi flag from kdebase's 
> compilation?  Looking at linux/joystick.h, I can't see a way of fixing 
> it as int64_t isn't an ANSI type, right?

Amazing how history repeats eh! LLH had similar problems back in its early
development. Mariusz Mazur ended up ensuring his headers always compiled
with the -ansi flag.

FWIW, I hit a similar problem when compiling xorg-6.9. I hacked around it
with something like this:

grep '__s64' /usr/include/linux/joystick.h >/dev/null 2>&1 && \
        sed -i.bak \
                '1i #undef __STRICT_ANSI__' \

This issue of -ansi with the new headers has come up on LKML and dwmw2 is
aware of it but so far no real resolution AFAICT. The thread has been
disjointed but it can be followed from these 2 points:


You should be contacting David Woodhouse directly about this sort of
breakage as he wants feedback. See here:



More information about the lfs-dev mailing list