Move utils_expand_path and utils_expand_path_keep_symlink to libpath.la
[lttng-tools.git] / src / common / compat / compat-fcntl.cpp
1 /*
2 * Copyright (C) 2011 David Goulet <dgoulet@efficios.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8 #define _LGPL_SOURCE
9 #include <common/compat/fcntl.h>
10 #include <common/macros.h>
11 #include <unistd.h>
12
13 #ifdef __linux__
14
15 int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
16 unsigned int flags)
17 {
18 #ifdef HAVE_SYNC_FILE_RANGE
19 return sync_file_range(fd, offset, nbytes, flags);
20 #else
21 return fdatasync(fd);
22 #endif
23 }
24
25 #endif /* __linux__ */
This page took 0.030974 seconds and 4 git commands to generate.