summaryrefslogtreecommitdiff
path: root/lib/libc/sys/ftruncate.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-09-17 21:16:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-09-17 21:16:02 +0000
commit4768505c29990ff01e13044545b29c1fdf9fcd31 (patch)
treeceb4510af8f14eab9795ee56c59b61875f938981 /lib/libc/sys/ftruncate.c
parent87ca0d033f283587c2220d51ccbe048f9201eabd (diff)
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/ftruncate.c')
-rw-r--r--lib/libc/sys/ftruncate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/sys/ftruncate.c b/lib/libc/sys/ftruncate.c
index 34da96b077f..c57c6a0b8b1 100644
--- a/lib/libc/sys/ftruncate.c
+++ b/lib/libc/sys/ftruncate.c
@@ -32,14 +32,17 @@
*/
#if defined(SYSLIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.8 2002/09/17 12:57:50 mickey Exp $";
+static char rcsid[] = "$OpenBSD: ftruncate.c,v 1.9 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>
#include "thread_private.h"
+#ifdef lint
+quad_t __syscall(quad_t, ...);
+#endif
+
/*
* This function provides 64-bit offset padding that
* is not supplied by GCC 1.X but is supplied by GCC 2.X.
@@ -54,7 +57,7 @@ ftruncate(fd, length)
if (_FD_LOCK(fd, FD_RDWR, NULL) != 0) {
retval = -1;
} else {
- retval = __syscall(SYS_ftruncate, fd, 0, length);
+ retval = __syscall((quad_t)SYS_ftruncate, fd, 0, length);
_FD_UNLOCK(fd, FD_RDWR);
}
return retval;