[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`NAME_MAX' undeclared



Stephan Wilms wrote:
> 
> Hi again,
> 
> RTEMS is sure giving me a real hard time today. After writing my previous
> posting (where a file within 'posix' refused to compile) I thought: well
> lets disable popsix and give it another try. I deleted the contents of
> the "/build/rtems/" directory and called "configure" like this:
> 
>   /source/rtems-4.0.0/configure --verbose
>                         --target=i386-rtems
>                         --prefix=/gcc-i386-rtems
>                         --disable-hwapi
>                         --disable-cxx
>                         --enable-networking
>                         --disable-posix
> 
> This time the "make all" got a lot further. It took a whole 4 minutes
> before it stopped with an error message:
> 
>     /gcc-i386-rtems/bin/i386-rtems-gcc -Wall -ansi -fasm -g -
> B/build/rtems/force386/lib/ -specs bsp_specs -qrtems   -O4 -fomit-frame-
> pointer -c -o o-force386/readdir.o /source/rtems-
> 4.0.0/c/src/lib/libc/readdir.c
>     In file included from \gcc-i386-rtems\i386-rtems\include\dirent.h:4,
>                      from /source/rtems-4.0.0/c/src/lib/libc/readdir.c:7:
>     \gcc-i386-rtems\i386-rtems\include\sys/dirent.h:44: `NAME_MAX'
> undeclared here (not in a function)
>     \gcc-i386-rtems\i386-rtems\include\sys/dirent.h:44: size of array
> `d_name' has non-integer type
>     make[4]: *** [o-force386/readdir.o] Error 1
>     make[3]: *** [all] Error 1
>     make[2]: *** [all] Error 1
>     make[1]: *** [all] Error 1
>     make[1]: Leaving directory `/build/rtems/c'
>     make: *** [all] Error 1
> 
> Another undeclared symbol, but a different one in a different file (with
> "enable-posix" I get an undeclared "PTHREAD_DESTRUCTOR_ITERATIONS" in
> file "posix/src/key.c").
> 
> Hmmm, this time I do not have any idea of how to get around the problem,
> which means, that I will try to find out what "NAME_MAX" is and why it is
> undeclared ...
> 
> Can anyone help me wtih this (these) problem(s) ?
> 
> Stephan
> 
> --
> Stephan Wilms (stephan.wilms at cwa.de)
> CWA-GmbH, Aachen, Germany

Hi,
I've resolved this problem modifying the file
/gcc-i386-rtems/i386-rtems/include/sys/dirent.h before start RTEMS
building procedure. I think this file is owned by newlib... :

    char		d_name[NAME_MAX + 1];	/* before */

          modified to fix a compiling error with :

    char		d_name[14 + 1];         /* after */

Good Work !