lttng-tools: Update to 2.13.9
authorTianling Shen <cnsztl@immortalwrt.org>
Wed, 17 May 2023 08:06:01 +0000 (16:06 +0800)
committerNick Hainke <vincent@systemli.org>
Thu, 18 May 2023 04:50:36 +0000 (06:50 +0200)
Backported a upstream commit (with manually rebased) to fix build
with musl 1.2.4.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
devel/lttng-tools/Makefile
devel/lttng-tools/patches/010-compat-off64_t-is-not-defined-by-musl.patch [new file with mode: 0644]

index 7e20de1498e4887938f8387f907dec7d69c108c0..c8eac7ae607a4a344497fd14496e6b54b49821a7 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lttng-tools
-PKG_VERSION:=2.12.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.13.9
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
-PKG_HASH:=0de7afc1f40a5acbede933cdfd6cf47b32ff84d02e170a1321f7fc86141585b8
+PKG_HASH:=8d94dc95b608cf70216b01203a3f8242b97a232db2e23421a2f43708da08f337
 
 PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1 GPL-2.0
diff --git a/devel/lttng-tools/patches/010-compat-off64_t-is-not-defined-by-musl.patch b/devel/lttng-tools/patches/010-compat-off64_t-is-not-defined-by-musl.patch
new file mode 100644 (file)
index 0000000..8b65f42
--- /dev/null
@@ -0,0 +1,78 @@
+From 57fd993799a2b081c826f6fc8def32d28d526bfb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
+ <jeremie.galarneau@efficios.com>
+Date: Tue, 17 Jan 2023 16:57:35 -0500
+Subject: [PATCH] compat: off64_t is not defined by musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This helps compile with latest musl, where off64_t is not defined unless
+_LARGEFILE64_SOURCE is defined. On glibc, _LARGEFILE64_SOURCE is defined
+if _GNU_SOURCE is defined, so the problem is only seen with musl.
+
+Since the project uses AC_SYS_LARGEFILE, which from the autoconf doc:
+"arrange for 64-bit file offsets, known as large-file support."
+
+As such, it is safe to assume off_t is 64-bit wide. This is checked by a
+static_assert to catch any platform where autoconf would let a 32-bit
+off_t slip.
+
+Reported-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
+---
+ src/common/compat/compat-fcntl.cpp |  2 +-
+ src/common/compat/fcntl.hpp        | 11 +++++------
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+--- a/src/common/compat/compat-fcntl.c
++++ b/src/common/compat/compat-fcntl.c
+@@ -13,7 +13,7 @@
+ #ifdef __linux__
+ LTTNG_HIDDEN
+-int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
++int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
+               unsigned int flags)
+ {
+ #ifdef HAVE_SYNC_FILE_RANGE
+--- 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>
+ #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
+ #ifdef __linux__
+-extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
++extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
+               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
+ #define SYNC_FILE_RANGE_WAIT_BEFORE   0
+ #define SYNC_FILE_RANGE_WRITE         0
+-static inline int lttng_sync_file_range(int fd, off64_t offset,
+-              off64_t nbytes, unsigned int flags)
++static inline int lttng_sync_file_range(int fd, off_t offset,
++              off_t nbytes, unsigned int flags)
+ {
+       return -ENOSYS;
+ }