From e911d154cedb53e3d8b306b52d0918882ddfaf1e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 8 Feb 2023 08:47:08 -0800 Subject: lttng-tools: Update LFS64 patch with upstream feedback See https://review.lttng.org/c/lttng-tools/+/9268 (From OE-Core rev: 515ce47f62d34daababb65d206bdae8c4e1e548f) Signed-off-by: Khem Raj Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- ...1-compat-Define-off64_t-as-off_t-on-linux.patch | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'meta/recipes-kernel') 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 + #include ++#include ++#include + #include + #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 - #include - #include +@@ -13,16 +13,12 @@ #include -#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 -- cgit v1.2.3-54-g00ecf