summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/truncate.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-09-17 21:15:58 +0000
committerderaadt <deraadt@openbsd.org>2002-09-17 21:15:58 +0000
commitf959b93e603007185f5289f88af72627053e53b4 (patch)
tree462c90d77387c706bb1dbfbc03a2df8c01d10f66 /lib/libc/sys/truncate.c
parentAllow user to restrict logs to be rotated by specifying pathnames on (diff)
downloadwireguard-openbsd-f959b93e603007185f5289f88af72627053e53b4.tar.xz
wireguard-openbsd-f959b93e603007185f5289f88af72627053e53b4.zip
uncommit, since it breaks macppc libc. millert and miod have now said they
did NOT approve those for commit. why did mickey feel he was ok to go commiting a set of diffs which had not been passed around and tested by people? we don't know. mickey, have you got something to say for yourself?
Diffstat (limited to 'lib/libc/sys/truncate.c')
-rw-r--r--lib/libc/sys/truncate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/sys/truncate.c b/lib/libc/sys/truncate.c
index 6c42edc4ff5..e0c62ed39b3 100644
--- a/lib/libc/sys/truncate.c
+++ b/lib/libc/sys/truncate.c
@@ -32,12 +32,15 @@
*/
#if defined(SYSLIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: truncate.c,v 1.7 2002/09/17 12:57:50 mickey Exp $";
+static char rcsid[] = "$OpenBSD: truncate.c,v 1.8 2002/09/17 21:16:01 deraadt Exp $";
#endif /* SYSLIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/syscall.h>
-#include <unistd.h>
+
+#ifdef lint
+quad_t __syscall(quad_t, ...);
+#endif
/*
* This function provides 64-bit offset padding that
@@ -49,5 +52,5 @@ truncate(path, length)
off_t length;
{
- return(__syscall(SYS_truncate, path, 0, length));
+ return(__syscall((quad_t)SYS_truncate, path, 0, length));
}