Ron McCall
Tue Dec 13 21:17:00 GMT 2005


While building crosstool-0.38 on Fedora Core 4 (i686)
for powerpc-7450, gcc-3.4.1 and glibc 2.3.3 (the
default for, I ran into a minor
problem.  At the step where is run to
build hello.c, I got the following error:

-static hello.c -o powerpc-7450-linux-gnu-hello-static
hello.c: In function `main':
hello.c:4: error: `PATH_MAX' undeclared (first use in
this function)
hello.c:4: error: (Each undeclared identifier is
reported only once
hello.c:4: error: for each function it appears in.)

I did a quick search to find which header(s) defined
PATH_MAX and found two:

The limits.h that hello.c actually includes is (found
via gcc -E):
which doesn't include any other header files.  But,
that header is needed to get the definition for

Adding a third include to hello.c, for
<linux/limits.h>, fixes the problem.  

Ron McCall

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list