Hoi,
I looked at the sources in src/main too. In some of the files I see #include <errno.h> , in others it is missing, although errno is used. I already included errno.h in all the files where errno is used, but that did not change anything.
In any case, I can reproduce the behaviour with two slightly different setups:
1) my C760 with OZ 3.5.4.1 (gpe) and the native-sdk-toolchain plus the additional packages from lardmans list:
http://wiki.openzaurus.org/HowTos/Native_Development(inlcuding the packages for X11 developement and g77 and libreadline)
I installed everything on my SD-card. For whatever reason (probably I did by mstake not use a "real" root shell, but used root login via su instead) some symboliks links were broken. But it was straightforward to repair them manually.
2) I tried it also with qemu and Poky (see here
http://www.o-hand.com/~richard/qemu.html)Additionally to the sdk already included in the poky image, I installed (everything from the OZ 3.5.4.1 feed):
g++_3.4.4-r5_arm.ipk
g++-uc_0.1.9-r1_arm.ipk
libgmp3_4.1.4-r0_arm.ipk
mpfr-dev_2.1.1-r1_arm.ipk
g77_3.4.4-r5_arm.ipk
ldd_2.3.5+cvs20050627-r3_arm.ipk
libgmp-dev_4.1.4-r0_arm.ipk
g77-symlinks_3.4.4-r5_arm.ipk
libg2c0_3.4.4-r3_arm.ipk
libreadline4_4.3-r2_arm.ipk
g++-symlinks_3.4.4-r5_arm.ipk
libg2c-dev_3.4.4-r5_arm.ipk
libreadline-dev_4.3-r2_arm.ipk
Both systems give exactly the same behaviour, thats why I think the problem is not related to the broken symlinks on my C760.