summaryrefslogtreecommitdiff
path: root/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
diff options
context:
space:
mode:
authorSamuel Martin <s.martin49@gmail.com>2012-06-03 00:09:18 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2012-06-17 20:42:38 +0200
commitfb5d605638c359d008329dd9f8fb6c2c8a2c0537 (patch)
tree44f212851f266e4edf60164b89d987640b470df0 /package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
parent6f9b64903005bf1f45a0e1a2d6d67696c7368c7c (diff)
lttng-tools: bump to version 2.0.1
Also update the sync_file_range patch. Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch')
-rw-r--r--package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch b/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
new file mode 100644
index 000000000..3a1807ed5
--- /dev/null
+++ b/package/lttng-tools/lttng-tools-no-sync-file-range-in-uclibc.patch
@@ -0,0 +1,50 @@
+Make sync_file_range() usage optional
+
+Under uClibc, sync_file_range() is not available under all
+architectures, so we fall back to fdatasync() in this case.
+
+Inspired by the patch done by Thomas Petazzoni for the
+2.0-pre25 version.
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ configure.ac | 2 +-
+ src/common/compat/fcntl.h | 5 +++++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5808c79..065b9cf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -120,7 +120,7 @@ AS_IF([test "x$lttng_ust_support" = "xyes"], [
+
+ AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [ test "x$ac_cv_lib_lttng_ust_ctl_ustctl_create_session" = "xyes" ])
+
+-AC_CHECK_FUNCS([sched_getcpu sysconf])
++AC_CHECK_FUNCS([sched_getcpu sysconf sync_file_range])
+
+ # check for dlopen
+ AC_CHECK_LIB([dl], [dlopen],
+diff --git a/src/common/compat/fcntl.h b/src/common/compat/fcntl.h
+index 58c1579..dafb33e 100644
+--- a/src/common/compat/fcntl.h
++++ b/src/common/compat/fcntl.h
+@@ -23,10 +23,15 @@
+
+ #ifdef __linux__
+
++#if defined(HAVE_SYNC_FILE_RANGE)
+ extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
+ unsigned int flags);
+ #define lttng_sync_file_range(fd, offset, nbytes, flags) \
+ compat_sync_file_range(fd, offset, nbytes, flags)
++#else
++#define lttng_sync_file_range(fd, offset, nbytes, flags) \
++ fdatasync(fd);
++#endif
+
+ #elif defined(__FreeBSD__)
+
+--
+1.7.10
+