[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem when building arm-rtems
- Date: Sun, 3 Jun 2007 21:13:27 +0800
- From: hiyangxi at gmail.com (xi yang)
- Subject: Problem when building arm-rtems
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?