Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: apache-httpd broken with apr-1.7.5 under 7.7
To:
Alexander HOTZ <alexander.hotz@luxmetering.lu>
Cc:
Mike Fischer <fischer+obsd@lavielle.com>, "ports@openbsd.org" <ports@openbsd.org>, Stefan Sperling <stsp@openbsd.org>
Date:
Wed, 18 Feb 2026 11:23:22 +0000

Download raw body.

Thread
On 2026/02/17 20:49, Alexander HOTZ wrote:
> I finally got around to test the diff, and can confirm that it does indeed fix the reported issue!
> The test was done on a fresh OpenBSD 7.8 installation.
> 
> Thank you so much for providing the patch, and sorry that it took me so long to test it...

Here it is again with an update to apr-1.7.6. ok with you Stefan?


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/apr/Makefile,v
diff -u -p -r1.54 Makefile
--- Makefile	10 Dec 2024 00:18:16 -0000	1.54
+++ Makefile	18 Feb 2026 10:33:03 -0000
@@ -1,7 +1,6 @@
 COMMENT=	Apache Portable Runtime
 
-V=		1.7.5
-REVISION=	0
+V=		1.7.6
 DISTNAME=	apr-$V
 SHARED_LIBS +=	apr-1             7.2     # .6.2
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/apr/distinfo,v
diff -u -p -r1.18 distinfo
--- distinfo	7 Nov 2024 10:34:56 -0000	1.18
+++ distinfo	18 Feb 2026 10:33:03 -0000
@@ -1,2 +1,2 @@
-SHA256 (apr-1.7.5.tar.gz) = M3X6Nl1nvPlF5StSy6B6vqV+9TD0Cygf++l3qSUTYds=
-SIZE (apr-1.7.5.tar.gz) = 1131871
+SHA256 (apr-1.7.6.tar.gz) = ahDn90MFEGAK8l+r9Gbh32GqrpEL8dxdEMRKRDPMyB0=
+SIZE (apr-1.7.6.tar.gz) = 1138032
Index: patches/patch-poll_unix_poll_c
===================================================================
RCS file: patches/patch-poll_unix_poll_c
diff -N patches/patch-poll_unix_poll_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-poll_unix_poll_c	18 Feb 2026 10:33:03 -0000
@@ -0,0 +1,42 @@
+https://bz.apache.org/bugzilla/show_bug.cgi?id=69410
+https://bz.apache.org/bugzilla/attachment.cgi?id=39941&action=diff&collapsed=&headers=1&format=raw
+
+Index: poll/unix/poll.c
+--- poll/unix/poll.c.orig
++++ poll/unix/poll.c
+@@ -113,7 +113,10 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprse
+     }
+     num_to_poll = i;
+ 
+-    if (timeout > 0) {
++    if (timeout < 0) {
++        timeout = -1;
++    }
++    else if (timeout > 0) {
+         /* convert microseconds to milliseconds (round up) */
+         timeout = (timeout + 999) / 1000;
+     }
+@@ -255,7 +258,10 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *p
+     }
+ #endif
+ 
+-    if (timeout > 0) {
++    if (timeout < 0) {
++        timeout = -1;
++    }
++    else if (timeout > 0) {
+         timeout = (timeout + 999) / 1000;
+     }
+ 
+@@ -411,7 +417,10 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pol
+     }
+ #endif
+ 
+-    if (timeout > 0) {
++    if (timeout < 0) {
++        timeout = -1;
++    }
++    else if (timeout > 0) {
+         timeout = (timeout + 999) / 1000;
+     }
+ 
Index: patches/patch-support_unix_waitio_c
===================================================================
RCS file: patches/patch-support_unix_waitio_c
diff -N patches/patch-support_unix_waitio_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-support_unix_waitio_c	18 Feb 2026 10:33:03 -0000
@@ -0,0 +1,18 @@
+https://bz.apache.org/bugzilla/show_bug.cgi?id=69410
+https://bz.apache.org/bugzilla/attachment.cgi?id=39941&action=diff&collapsed=&headers=1&format=raw
+
+Index: support/unix/waitio.c
+--- support/unix/waitio.c.orig
++++ support/unix/waitio.c
+@@ -46,7 +46,10 @@ apr_status_t apr_wait_for_io_or_timeout(apr_file_t *f,
+     pfd.fd     = f        ? f->filedes        : s->socketdes;
+     pfd.events = for_read ? POLLIN            : POLLOUT;
+ 
+-    if (timeout > 0) {
++    if (timeout < 0) {
++        timeout = -1;
++    }
++    else if (timeout > 0) {
+         timeout = (timeout + 999) / 1000;
+     }
+     do {