lighttpd: restore omission of O_NONBLOCK

Remove O_NONBLOCK from flags for regular files as libc cannot tell apart
regular files from others behind file-system sessions. Otherwise, reads
always "fail" with EAGAIN.

genodelabs/genode#5093
This commit is contained in:
Christian Helmuth 2024-03-05 11:54:18 +01:00
parent 706e341d3a
commit 83afc6e438
3 changed files with 15 additions and 2 deletions

View File

@ -1 +1 @@
fe4e04aee96a64815757202aae6812cb64bbcf50 bbd4b02e545e2ba95fffddf5411c44dbbdb75efe

View File

@ -6,4 +6,4 @@ URL(lighttpd) := http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-$
SHA(lighttpd) := 816cbec71e8d02d874f1d5c798d76d091a76d5acbeb6e017ba76aeb4263d6995 SHA(lighttpd) := 816cbec71e8d02d874f1d5c798d76d091a76d5acbeb6e017ba76aeb4263d6995
DIR(lighttpd) := src/app/lighttpd DIR(lighttpd) := src/app/lighttpd
PATCHES := $(addprefix src/app/lighttpd/,fd_cloexec.patch mod_dirlisting.patch mod_webdav.patch) PATCHES := $(addprefix src/app/lighttpd/,fd_cloexec.patch mod_dirlisting.patch mod_webdav.patch no_o_nonblock.patch)

View File

@ -0,0 +1,13 @@
Remove O_NONBLOCK from flags for regular files as libc cannot tell apart
regular files from others behind file-system sessions.
+++ src/app/lighttpd/src/fdevent.c 2024-03-05 11:49:43.490307503 +0100
@@ -205,7 +205,7 @@
/* O_CLOEXEC handled further below, if defined) */
#ifdef O_NONBLOCK
#define FDEVENT_O_FLAGS \
- (O_BINARY | O_LARGEFILE | O_NOCTTY | O_NONBLOCK)
+ (O_BINARY | O_LARGEFILE | O_NOCTTY )
#else
#define FDEVENT_O_FLAGS \
(O_BINARY | O_LARGEFILE | O_NOCTTY )