summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/truncate.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-10-16 06:29:56 +0000
committerguenther <guenther@openbsd.org>2011-10-16 06:29:56 +0000
commitaaac0abe0a28be3acaaffdc7761bba18f946236b (patch)
treeaf437155ae30404f4283a857602a300c56507ec8 /lib/libc/sys/truncate.c
parentAdd stubs and manpage for __{get,set}_tcb (diff)
downloadwireguard-openbsd-aaac0abe0a28be3acaaffdc7761bba18f946236b.tar.xz
wireguard-openbsd-aaac0abe0a28be3acaaffdc7761bba18f946236b.zip
Make consistent the syscall stubs for the syscalls that got special
handling to fix up the alignment of 64bit arguments so that they do the same dance where _thread_sys_FOO is the real stub and FOO is a weak alias. For some of them, this is needed for cancellation handling. From discussions with fgsch@, ok millert@
Diffstat (limited to 'lib/libc/sys/truncate.c')
-rw-r--r--lib/libc/sys/truncate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/sys/truncate.c b/lib/libc/sys/truncate.c
index 960deb6f617..6516136672f 100644
--- a/lib/libc/sys/truncate.c
+++ b/lib/libc/sys/truncate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: truncate.c,v 1.12 2005/08/08 08:05:38 espie Exp $ */
+/* $OpenBSD: truncate.c,v 1.13 2011/10/16 06:29:56 guenther Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -31,15 +31,20 @@
#include <sys/types.h>
#include <sys/syscall.h>
#include <unistd.h>
+#include "thread_private.h"
register_t __syscall(quad_t, ...);
+STUB_PROTOTYPE(truncate);
+
+STUB_ALIAS(truncate);
+
/*
* This function provides 64-bit offset padding that
* is not supplied by GCC 1.X but is supplied by GCC 2.X.
*/
int
-truncate(const char *path, off_t length)
+STUB_NAME(truncate)(const char *path, off_t length)
{
return(__syscall((quad_t)SYS_truncate, path, 0, length));