Problem when building arm-rtems

xi yang hiyangxi at gmail.com
Sun Jun 3 13:13:27 UTC 2007


I used arm-rtems-gcc 3.4.0 binutils-2.17 newlib-1.15.0 to build
rtems-4.7.99.1 . ../rtems-4.7.99.1/configure --target=arm-rtems
--prefix=/opt/rtems .

Then it reported usleep function in cpukit/posix/src/usleep.c and
readlink function in cpukit/libcsupport/src/readlink.c had conflict
with /opt/rtems/arm-rtems/include/sys/unistd.h

usleep.c the definition is
 unsigned usleep(
             unsigned int useconds
)
{}
but in unistd.h is
 int _EXFUN(usleep,(useconds_t __useconds));
So i changed the definition of usleep to
  int usleep(useconds_t useconds){}


The same problem with readlink.
 int readlink(
            const char *pathname,
            char *buf,
            int bufsize
)
but in unistd.h the declaration is
 ssize_t _EXFUN(readlink,(const char *__path,char *__buf,size_t __buflen);
So i changed the definition of readlink to
  ssize_t readlink(
                const char *pathname,
                char *buf,
                size_t bufsize){}
After changed i can build it successfully.

Why the definitions conflict with the declarations?Is the problem with
rtems or the newlib i used?



More information about the users mailing list