summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-02-08 08:47:08 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-09 09:50:42 +0000
commit515ce47f62d34daababb65d206bdae8c4e1e548f (patch)
treec8516172b621177985e0f594a4799ce18c628839
parent350d8677c4f7b6ff7604bff6b2f4ab7f1b9ec422 (diff)
downloadopenembedded-core-contrib-515ce47f62d34daababb65d206bdae8c4e1e548f.tar.gz
lttng-tools: Update LFS64 patch with upstream feedback
See https://review.lttng.org/c/lttng-tools/+/9268 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch26
1 files changed, 14 insertions, 12 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch
index ef81703bc3..4e21d1e9f1 100644
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch
@@ -22,7 +22,14 @@ Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
--- a/src/common/compat/compat-fcntl.c
+++ b/src/common/compat/compat-fcntl.c
-@@ -13,7 +13,7 @@
+@@ -8,14 +8,17 @@
+ #define _LGPL_SOURCE
+ #include <common/compat/fcntl.h>
+ #include <common/macros.h>
++#include <common/bug.h>
++#include <stdint.h>
+ #include <unistd.h>
+
#ifdef __linux__
LTTNG_HIDDEN
@@ -30,25 +37,20 @@ Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
+int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
unsigned int flags)
{
++ LTTNG_BUILD_BUG_ON(sizeof(off_t) != sizeof(int64_t));
#ifdef HAVE_SYNC_FILE_RANGE
+ return sync_file_range(fd, offset, nbytes, flags);
+ #else
--- a/src/common/compat/fcntl.h
+++ b/src/common/compat/fcntl.h
-@@ -8,21 +8,21 @@
- #ifndef _COMPAT_FCNTL_H
- #define _COMPAT_FCNTL_H
-
-+#include <assert.h>
- #include <fcntl.h>
- #include <sys/types.h>
+@@ -13,16 +13,12 @@
#include <common/compat/errno.h>
-#if (defined(__CYGWIN__))
-typedef long long off64_t;
-#endif
-+static_assert(sizeof(off_t) == sizeof(int64_t),
-+ "Build system is misconfigured, off_t must be 64-bit wide");
-
+-
#if (defined(__FreeBSD__) || defined(__sun__))
typedef off64_t loff_t;
#endif
@@ -59,7 +61,7 @@ Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
unsigned int flags);
#define lttng_sync_file_range(fd, offset, nbytes, flags) \
compat_sync_file_range(fd, offset, nbytes, flags)
-@@ -37,8 +37,8 @@ extern int compat_sync_file_range(int fd
+@@ -37,8 +33,8 @@ extern int compat_sync_file_range(int fd
#define SYNC_FILE_RANGE_WAIT_BEFORE 0
#define SYNC_FILE_RANGE_WRITE 0