From: Eric Wong Date: Thu, 7 Sep 2023 00:54:09 +0000 (+0000) Subject: xap_helper: fix fcntl() argument order X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1e1605a4de96de2a5ba2c17b4bc183b83f57905;p=thirdparty%2Fpublic-inbox.git xap_helper: fix fcntl() argument order *sigh* I only noticed this when running `make check-run' under OpenBSD. --- 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));