summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-07-27 10:42:24 +0000
committerbluhm <bluhm@openbsd.org>2017-07-27 10:42:24 +0000
commit42c0683c5609fe346691c97e80c553467d6eec66 (patch)
treef33094fecef79fbc511a0b849e9c4a3e6c3c07d5
parentAdd pane_at_left/right/top/bottom formats, from Amos Bird. (diff)
downloadwireguard-openbsd-42c0683c5609fe346691c97e80c553467d6eec66.tar.xz
wireguard-openbsd-42c0683c5609fe346691c97e80c553467d6eec66.zip
fcntl(F_DUPFD) needs an argument. Otherwise it fails with EINVAL
when compiled with clang.
-rw-r--r--regress/sys/kern/fcntl_dup/fcntl_dup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/kern/fcntl_dup/fcntl_dup.c b/regress/sys/kern/fcntl_dup/fcntl_dup.c
index 88469c611f9..0f16ba7a8c0 100644
--- a/regress/sys/kern/fcntl_dup/fcntl_dup.c
+++ b/regress/sys/kern/fcntl_dup/fcntl_dup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fcntl_dup.c,v 1.2 2003/07/31 21:48:08 deraadt Exp $ */
+/* $OpenBSD: fcntl_dup.c,v 1.3 2017/07/27 10:42:24 bluhm Exp $ */
/*
* Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain.
*/
@@ -28,7 +28,7 @@ main(int argc, char *argv[])
if (fcntl(fd1, F_SETFD, 1) != 0)
err(1, "fcntl(F_SETFD)");
- if ((fd2 = fcntl(fd1, F_DUPFD)) < 0)
+ if ((fd2 = fcntl(fd1, F_DUPFD, 0)) < 0)
err(1, "fcntl(F_DUPFD)");
/* Test 2: Was close-on-exec cleared? */