]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lttng-tools: Update LFS64 patch with upstream feedback
authorKhem Raj <raj.khem@gmail.com>
Wed, 8 Feb 2023 16:47:08 +0000 (08:47 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 Feb 2023 09:50:42 +0000 (09:50 +0000)
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>
meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch

index ef81703bc3a9c26acb1a0d6618ce1bc0cf022acb..4e21d1e9f10c2a2683df6ef8ba676aaad8faac93 100644 (file)
@@ -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