On Fri, 2006-01-20 at 15:37 +0100, Tob_Sch@gmx.de wrote:
Hi,
compiling libol-0.3.16 (and syslog-ng-1.6.8) on HP-UX 11.00/11.11 worked without any problems. Today, I tried to compile libol-0.3.17 (and syslog-ng-1.6.9).
Can you check if the below patch works? diff -u -r1.45 io.c --- io.c 23 Nov 2005 08:49:21 -0000 1.45 +++ io.c 23 Jan 2006 09:01:03 -0000 @@ -490,13 +490,27 @@ int res; UINT8 eofbuf[1]; +#ifdef MSG_DONTWAIT res = recv(self->fd, eofbuf, 1, MSG_PEEK | MSG_DONTWAIT); +#else + { + int old_flags; + + old_flags = fcntl(self->fd, F_GETFL); + fcntl(self->fd, F_SETFL, old_flags | O_NONBLOCK); + res = recv(self->fd, eofbuf, 1, MSG_PEEK); + if ((old_flags & O_NONBLOCK) == 0) + fcntl(self->fd, F_SETFL, old_flags); + } +#endif + if (res == 0) { /* EOF detected */ werror("io.c: do_write: write() failed, EOF detected\n"); errno = ECONNRESET; return -1; } + res = write(self->fd, data, length); saved_errno = errno; -- Bazsi