Common Trace Format 2 generation
[lttng-tools.git] / src / common / compat / compat-fcntl.cpp
CommitLineData
3fa91327 1/*
ab5be9fa 2 * Copyright (C) 2011 David Goulet <dgoulet@efficios.com>
3fa91327 3 *
ab5be9fa 4 * SPDX-License-Identifier: GPL-2.0-only
3fa91327 5 *
3fa91327
DG
6 */
7
6c1c0768 8#define _LGPL_SOURCE
7532fa3b
MD
9#include <common/compat/fcntl.hpp>
10#include <common/macros.hpp>
efc18125 11#include <unistd.h>
3fa91327
DG
12
13#ifdef __linux__
14
15int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
16 unsigned int flags)
17{
281047b8 18#ifdef HAVE_SYNC_FILE_RANGE
3fa91327 19 return sync_file_range(fd, offset, nbytes, flags);
281047b8
SM
20#else
21 return fdatasync(fd);
22#endif
3fa91327
DG
23}
24
25#endif /* __linux__ */
This page took 0.08552 seconds and 5 git commands to generate.