summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread_fork.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2016-04-02 19:00:51 +0000
committerguenther <guenther@openbsd.org>2016-04-02 19:00:51 +0000
commit29088be8b13bc36bca8451826ff50171aa8a83c9 (patch)
tree615cd0fc2db37ee8c9ac70a26721acd9cb192d5f /lib/librthread/rthread_fork.c
parentUse open(tty, O_WRONLY) + fdopen() instead of fopen(tty, "w") to (diff)
downloadwireguard-openbsd-29088be8b13bc36bca8451826ff50171aa8a83c9.tar.xz
wireguard-openbsd-29088be8b13bc36bca8451826ff50171aa8a83c9.zip
Eliminate the need to explicitly invoke syscalls via their _thread_sys_*
aliases by using a macro REDIRECT_SYSCALL() to map the symbols. Apply that to getthrid(), sysctl(), and issetugid() as well. ok mpi@ beck@
Diffstat (limited to 'lib/librthread/rthread_fork.c')
-rw-r--r--lib/librthread/rthread_fork.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/librthread/rthread_fork.c b/lib/librthread/rthread_fork.c
index e6d632f90bf..3f7a5faa32c 100644
--- a/lib/librthread/rthread_fork.c
+++ b/lib/librthread/rthread_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_fork.c,v 1.15 2016/01/27 08:40:05 kettenis Exp $ */
+/* $OpenBSD: rthread_fork.c,v 1.16 2016/04/02 19:00:51 guenther Exp $ */
/*
* Copyright (c) 2008 Kurt Miller <kurt@openbsd.org>
@@ -45,6 +45,8 @@
#include "rthread.h"
+REDIRECT_SYSCALL(getthrid);
+
pid_t _thread_sys_fork(void);
pid_t _thread_sys_vfork(void);
pid_t _dofork(int);