diff options
Diffstat (limited to 'lib/libc/sys/pread.c')
-rw-r--r-- | lib/libc/sys/pread.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/sys/pread.c b/lib/libc/sys/pread.c index 1d2fee6..7566566 100644 --- a/lib/libc/sys/pread.c +++ b/lib/libc/sys/pread.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 @@ -48,5 +49,9 @@ pread(fd, buf, nbyte, offset) size_t nbyte; off_t offset; { - return ((ssize_t)__syscall((quad_t)SYS_pread, fd, buf, nbyte, 0, offset)); + + if (__getosreldate() >= 700051) + return (__sys_pread(fd, buf, nbyte, offset)); + else + return (__sys_freebsd6_pread(fd, buf, nbyte, 0, offset)); } |