Problem when building arm-rtems

ray xr at
Sun Jun 3 16:24:35 UTC 2007

Newlib version and rtems do not match.
refer to the mail-list for resolution.
Good luck!

Thanks & Best Regards!

From: xi yang
Date: 2007-06-03 21:15:35
To:   RTEMS Users
Sub:  Problem when building arm-rtems

>>I used arm-rtems-gcc 3.4.0 binutils-2.17 newlib-1.15.0 to build
>rtems- . ../rtems- --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?
>rtems-users mailing list
>rtems-users at

More information about the users mailing list