Peter Chubb <[email protected]> writes: >>>>>> "Simon" == Simon Josefsson <[email protected]> writes: > > Simon> Hi! I maintain libidn and noticed the following code fails on > Simon> caballero: > > Simon> fd = func ("/dev/null", O_RDONLY); ASSERT (0 <= fd); { char > Simon> c; ASSERT (read (fd, &c, 1) == 0); } > > What are the types of func and fd? Is there a prototype in scope for > func() ? What is the failure? Does the first assertion fail? Or > does the read() fail?
The entire code is available from here: http://git.savannah.gnu.org/cgit/libidn.git/tree/gltests/test-open.h http://git.savannah.gnu.org/cgit/libidn.git/tree/gltests/test-open.c It is the second assertion that is failing, which suggests the program was able to read data out of /dev/null on the build host. > This program works on ia64 -- it completes with no output, and exits > 0. I think your program does basically the same thing as the self-test. So the question is if it works in a build environment on the caballero buildd. Maybe the build environment sets up a non-standard /dev/null? Thanks, /Simon -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

