diff options
Diffstat (limited to 'lib/libc/sys/truncate.c')
-rw-r--r-- | lib/libc/sys/truncate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/sys/truncate.c b/lib/libc/sys/truncate.c index e26f3f5..375c9d9 100644 --- a/lib/libc/sys/truncate.c +++ b/lib/libc/sys/truncate.c @@ -35,8 +35,8 @@ __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 @@ -48,5 +48,8 @@ truncate(path, length) off_t length; { - return(__syscall((quad_t)SYS_truncate, path, 0, length)); + if (__getosreldate() >= 700051) + return(__sys_truncate(path, length)); + else + return(__sys_freebsd6_truncate(path, 0, length)); } |