diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2007-07-04 23:27:38 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2007-07-04 23:27:38 +0000 |
| commit | 4dd719bd7f6491cea2f15846bf5ebcfd3d5e862f (patch) | |
| tree | c6557e22092cc28b77304e9185ac106ae162a5ca /lib/libc/sys/ftruncate.c | |
| parent | 65a6d893baa4ff43995d874bdaf3119266533e84 (diff) | |
Notes
Diffstat (limited to 'lib/libc/sys/ftruncate.c')
| -rw-r--r-- | lib/libc/sys/ftruncate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/sys/ftruncate.c b/lib/libc/sys/ftruncate.c index fcd2ef8da2e2..78b5a36adba6 100644 --- a/lib/libc/sys/ftruncate.c +++ b/lib/libc/sys/ftruncate.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/syscall.h> #include <unistd.h> +#include "libc_private.h" /* * This function provides 64-bit offset padding that @@ -47,5 +48,8 @@ ftruncate(fd, length) off_t length; { - return(__syscall((quad_t)SYS_ftruncate, fd, 0, length)); + if (__getosreldate() >= 700051) + return(__sys_ftruncate(fd, length)); + else + return(__sys_freebsd6_ftruncate(fd, 0, length)); } |
