blob: dce967d39d6c4bc8f1e2b7cbf8410fdaa1aed093 [file] [log] [blame]
Jens Axboeed80ddf2009-11-23 15:14:48 +01001#include <stdlib.h>
Jens Axboef1662802009-11-24 08:48:21 +01002#include <errno.h>
Jens Axboec5c8bd52009-11-24 13:01:41 +01003#include <sys/socket.h>
Jens Axboef8ed6d82009-12-16 09:50:05 +01004#include <sys/time.h>
Jens Axboec5c8bd52009-11-24 13:01:41 +01005#include <netinet/in.h>
Jens Axboe285d4512010-03-15 13:38:11 +01006#include <unistd.h>
Jens Axboeed80ddf2009-11-23 15:14:48 +01007
8#include "compiler/compiler.h"
Joss Grossman6fe1c1d2010-09-30 10:51:42 +09009#include "arch/arch.h"
Jens Axboed09913c2009-12-16 19:23:10 +010010#include "os/os.h"
Jens Axboeed80ddf2009-11-23 15:14:48 +010011
Jens Axboe67bf9822013-01-10 11:23:19 +010012#ifndef CONFIG_LINUX_FALLOCATE
13int fallocate(int fd, int mode, off_t offset, off_t len)
Jens Axboe804bb9a2011-07-12 20:49:46 +020014{
15 errno = ENOSYS;
16 return -1;
17}
Wade Clinebcb01f82012-08-01 08:45:48 +020018#endif
Jens Axboe804bb9a2011-07-12 20:49:46 +020019
Jens Axboe67bf9822013-01-10 11:23:19 +010020#ifndef CONFIG_POSIX_FALLOCATE
21int posix_fallocate(int fd, off_t offset, off_t len)
Jens Axboeed80ddf2009-11-23 15:14:48 +010022{
23 return 0;
24}
Jens Axboe285d4512010-03-15 13:38:11 +010025#endif
Jens Axboec5c8bd52009-11-24 13:01:41 +010026
Jens Axboe67bf9822013-01-10 11:23:19 +010027#ifndef CONFIG_SYNC_FILE_RANGE
28int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
Jens Axboea54cf032010-03-13 11:29:47 +010029{
Jens Axboe285d4512010-03-15 13:38:11 +010030 errno = ENOSYS;
31 return -1;
Jens Axboea54cf032010-03-13 11:29:47 +010032}
Jens Axboe285d4512010-03-15 13:38:11 +010033#endif
Jens Axboe09164e52012-11-29 21:27:20 +010034
Jens Axboe67bf9822013-01-10 11:23:19 +010035#ifndef CONFIG_FADVISE
36int posix_fadvise(int fd, off_t offset, off_t len, int advice)
Jens Axboe09164e52012-11-29 21:27:20 +010037{
38 return 0;
39}
40#endif