On Tue, Jul 07, 2009 at 01:05:41AM +0200, Luca Favatella wrote: > This patch solves a poll() portability issue on kfreebsd-i386, and > shouldn't affect other archs. > > I tested this on kfreebsd-i386, solving an infinite loop.
> Index: src/exec.c > =================================================================== > --- src/exec.c (.../trunk/packages/libdebian-installer) > (revision 59247) > +++ src/exec.c > (.../branches/d-i/kfreebsd/packages/libdebian-installer) (revision > 59254) > @@ -164,7 +164,12 @@ > > for (i = 0; i < pipes; i++) > { > +// References: http://www.greenend.org.uk/rjk/2001/06/poll.html While // is a valid comment syntax in C99, it wasn't in earlier versions of C, and I believe that /* ... */ is still preferred in libd-i. > +#if defined(__FreeBSD_kernel__) > + if ((pollfds[i].revents & POLLIN) && (! (pollfds[i].revents & > POLLHUP))) > +#else > if (pollfds[i].revents & POLLIN) > +#endif This looks OK. -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org