summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sysconf.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-09-10 18:20:00 +0000
committerguenther <guenther@openbsd.org>2017-09-10 18:20:00 +0000
commit81064d433281cbb881394cc726b6ecbb9268d4ee (patch)
treebc0dbc3e8baf2fddc8cfad4fc471e1cb0a8b517e /lib/libc/gen/sysconf.c
parentBackslash escapes the next character in filename patterns. (diff)
downloadwireguard-openbsd-81064d433281cbb881394cc726b6ecbb9268d4ee.tar.xz
wireguard-openbsd-81064d433281cbb881394cc726b6ecbb9268d4ee.zip
shm_open(), sysconf(), tcflow(), and tcsendbreak() are not permitted to be
cancellation points in POSIX, so change them to invoke the non-cancellation point versions of open(), close(), nanosleep(), and write() ok deraadt@ millert@
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r--lib/libc/gen/sysconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index 03becb59eec..e73bc437dab 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysconf.c,v 1.24 2016/03/20 02:32:40 guenther Exp $ */
+/* $OpenBSD: sysconf.c,v 1.25 2017/09/10 18:20:00 guenther Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
@@ -241,7 +241,7 @@ sysconf(int name)
value = socket(PF_INET6, SOCK_DGRAM, 0);
errno = sverrno;
if (value >= 0) {
- close(value);
+ HIDDEN(close)(value);
return (200112L);
} else
return (0);