575495fe55b3818a4aba8e5af3c41872aab91e74
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
22 #include <sys/types.h>
26 extern int compat_sync_file_range(int fd
, off64_t offset
, off64_t nbytes
,
28 #define lttng_sync_file_range(fd, offset, nbytes, flags) \
29 compat_sync_file_range(fd, offset, nbytes, flags)
33 typedef long int off64_t
;
34 typedef off64_t loff_t
;
36 #include <sys/errno.h>
39 * Possible flags under Linux. Simply nullify them and avoid wrapper.
41 #define SYNC_FILE_RANGE_WAIT_AFTER 0
42 #define SYNC_FILE_RANGE_WAIT_BEFORE 0
43 #define SYNC_FILE_RANGE_WRITE 0
46 * Possible flags under Linux. Simply nullify them and avoid wrappers.
48 #define SPLICE_F_MOVE 0
49 #define SPLICE_F_NONBLOCK 0
50 #define SPLICE_F_MORE 0
51 #define SPLICE_F_GIFT 0
53 #define POSIX_FADV_DONTNEED 0
55 static inline int lttng_sync_file_range(int fd
, off64_t offset
,
56 off64_t nbytes
, unsigned int flags
)
61 static inline ssize_t
splice(int fd_in
, loff_t
*off_in
, int fd_out
, loff_t
*off_out
,
62 size_t len
, unsigned int flags
)
67 static inline int posix_fadvise(int fd
, off_t offset
, off_t len
, int advice
)
73 #error "Please add support for your OS into compat/fcntl.h."
74 #endif /* __linux__ , __FreeBSD__ */
76 #endif /* _COMPAT_FCNTL_H */
This page took 0.029689 seconds and 3 git commands to generate.