X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fcompat-fcntl.c;h=527abd857f8f47605765838ae8feb031d10d3790;hp=5a1c757b864ed1de210f19b60744714bce01dcd6;hb=11a2fd460f033afa2d5f41a70eb1fd3a84fcf89d;hpb=d14d33bf091e72b23b1f90ea18a0a01bed098b76 diff --git a/src/common/compat/compat-fcntl.c b/src/common/compat/compat-fcntl.c index 5a1c757b8..527abd857 100644 --- a/src/common/compat/compat-fcntl.c +++ b/src/common/compat/compat-fcntl.c @@ -16,14 +16,20 @@ */ #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__ */