rtems 4.9 build failure due to new unistd.h

Gene Smith gds at chartertn.net
Mon Dec 8 07:45:16 UTC 2008


I recently tried to do a "make clean all" of rtems and it fails when 
compiling ttyname.c: ttyname_r() with a complaint that it differs from 
the declaration in unistd.h.  ttyname_r() has parameter namesize 
declared as int while in unistd.h it is size_t and declared only for 
cygwin and rtems.

I think unistd.h (under /opt/rtems-4.9/arm-rtems4.9/include/sys) was 
recently yum updated since on another machine which has not been 
recently updated it only declares ttyname_r() in unistd.h for cygwin and 
not for rtems, so there is no conflict.

Anyhow, I ended up changing namesize from int to a size_t in 
rtems-4.9.0/cpukit/libcsupport/src/ttyname.c.

-gene
P/S:
It seems that namesize is not actually used in posix function 
ttyname_r(). Also, is "Demetermine" a real word?




More information about the users mailing list