X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fcompat-fcntl.c;h=c6c6b4e994962d84c353eaad21bb2013dfca9b4d;hp=5a1c757b864ed1de210f19b60744714bce01dcd6;hb=890d8fe47755c3bad936389cf48ffa141cff41c9;hpb=d14d33bf091e72b23b1f90ea18a0a01bed098b76 diff --git a/src/common/compat/compat-fcntl.c b/src/common/compat/compat-fcntl.c index 5a1c757b8..c6c6b4e99 100644 --- a/src/common/compat/compat-fcntl.c +++ b/src/common/compat/compat-fcntl.c @@ -15,15 +15,20 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE +#define _LGPL_SOURCE #include +#include #ifdef __linux__ int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags) { +#ifdef HAVE_SYNC_FILE_RANGE return sync_file_range(fd, offset, nbytes, flags); +#else + return fdatasync(fd); +#endif } #endif /* __linux__ */