2 * Copyright (C) 2011 - David Goulet <dgoulet@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; only version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307, USA.
18 #ifndef _COMPAT_FCNTL_H
19 #define _COMPAT_FCNTL_H
23 #define lttng_sync_file_range(fd, offset, nbytes, flags) \
24 compat_sync_file_range(fd, offset, nbytes, flags)
28 int compat_sync_file_range(int fd
, off64_t offset
, off64_t nbytes
,
31 return sync_file_range(fd
, offset
, nbytes
, flags
);
37 * Possible flags under Linux. Simply nullify them and avoid wrapper.
39 #define SYNC_FILE_RANGE_WAIT_AFTER 0
40 #define SYNC_FILE_RANGE_WAIT_BEFORE 0
41 #define SYNC_FILE_RANGE_WRITE 0
43 typedef long int off64_t
;
44 typedef off64_t loff_t
;
46 int compat_sync_file_range(int fd
, off64_t offset
, off64_t nbytes
,
53 * Possible flags under Linux. Simply nullify them and avoid wrappers.
55 #define SPLICE_F_MOVE 0
56 #define SPLICE_F_NONBLOCK 0
57 #define SPLICE_F_MORE 0
58 #define SPLICE_F_GIFT 0
60 ssize_t
splice(int fd_in
, loff_t
*off_in
, int fd_out
,
61 loff_t
*off_out
, size_t len
, unsigned int flags
)
67 #error "Please add support for your OS into compat/fcntl.h."
68 #endif /* __linux__ , __FreeBSD__ */
70 #endif /* _COMPAT_FCNTL_H */
This page took 0.038255 seconds and 5 git commands to generate.