Revert "mips64: time64 for n32 ABI breaks a lot of tests, disable it for now"
[uclibc-ng.git] / libc / sysdeps / linux / common / posix_fallocate64.c
blob3109d7c7a7c79b4963d4cac1fc721d19a52da59d
1 /*
2 * posix_fallocate() for uClibc
3 * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
8 */
10 #include <sys/syscall.h>
11 #include <fcntl.h>
12 #include <bits/kernel-features.h>
13 #include <stdint.h>
14 #include <errno.h>
16 #if defined __NR_fallocate
17 # if __WORDSIZE == 64
18 /* Can use normal posix_fallocate() */
19 # elif __WORDSIZE == 32
20 extern __typeof(fallocate64) __libc_fallocate64 attribute_hidden;
21 int posix_fallocate64(int fd, __off64_t offset, __off64_t len)
23 if (__libc_fallocate64(fd, 0, offset, len))
24 return errno;
25 return 0;
27 # else
28 # error your machine is neither 32 bit or 64 bit ... it must be magical
29 # endif
30 #endif