From c1e92f54cb212cb06a0ec983b61f85992d594cca Mon Sep 17 00:00:00 2001 From: NRK Date: Sun, 5 Apr 2026 21:28:31 +0000 Subject: [PATCH] shared: fix fcntl argument order how this managed to survive my tests is beyond me... fixes: b6db87756c9ae6338bd58c02bdca941adf6db97d --- src/shared/helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/helpers.h b/src/shared/helpers.h index ba95b916a..cf9ee2b5f 100644 --- a/src/shared/helpers.h +++ b/src/shared/helpers.h @@ -288,7 +288,7 @@ RC_UNUSED static char *env_findvar(const char *name, char **envp) RC_UNUSED static int xopen_nonblock(const char *filename, int flags, mode_t mode) { int fd = open(filename, flags | O_NONBLOCK, mode); - if (fd >= 0 && fcntl(F_SETFL, fd, flags & ~O_NONBLOCK) < 0) { + if (fd >= 0 && fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) < 0) { int saved_errno = errno; close(fd); fd = -1;