Fix: libcompat is now part of libcommon
[lttng-tools.git] / src / common / compat / compat-fcntl.c
index 5a1c757b864ed1de210f19b60744714bce01dcd6..a0f4a199732ed40f6f52e50d7381e8d52566cd72 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <common/compat/fcntl.h>
+#include <unistd.h>
 
 #ifdef __linux__
 
+LTTNG_HIDDEN
 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__ */
This page took 0.027024 seconds and 5 git commands to generate.