From d1e1605a4de96de2a5ba2c17b4bc183b83f57905 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 Sep 2023 00:54:09 +0000 Subject: [PATCH] xap_helper: fix fcntl() argument order *sigh* I only noticed this when running `make check-run' under OpenBSD. --- lib/PublicInbox/xap_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h index 73590efd8..707603676 100644 --- a/lib/PublicInbox/xap_helper.h +++ b/lib/PublicInbox/xap_helper.h @@ -1168,9 +1168,9 @@ int main(int argc, char *argv[]) if (!worker_pids) err(EXIT_FAILURE, "calloc"); if (pipe(pipefds)) err(EXIT_FAILURE, "pipe"); - int fl = fcntl(F_GETFL, pipefds[1]); + int fl = fcntl(pipefds[1], F_GETFL); if (fl == -1) err(EXIT_FAILURE, "F_GETFL"); - if (fcntl(F_SETFL, pipefds[1], fl | O_NONBLOCK)) + if (fcntl(pipefds[1], F_SETFL, fl | O_NONBLOCK)) err(EXIT_FAILURE, "F_SETFL"); CHECK(int, 0, sigdelset(&pset, SIGCHLD)); -- 2.47.2