From 44697b8e3b776a0d1ba800bc4bc87e614b5776f9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 29 Sep 2026 06:01:09 +0000 Subject: [PATCH] libdvdread: fix off64_t definition in dvd_filesystem.h for musl dvd_filesystem.h unconditionally uses the glibc LFS64 off64_t name. musl's off_t is already 64-bit, so typedef it the same way the other non-glibc branches already do. This also fixes libdvdnav, which consumes this staged header. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...em.h-fix-off64_t-definition-for-musl.patch | 39 +++++++++++++++++++ .../libdvdread/libdvdread_7.1.1.bb | 4 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-multimedia/libdvdread/files/0001-dvd_filesystem.h-fix-off64_t-definition-for-musl.patch diff --git a/meta-multimedia/recipes-multimedia/libdvdread/files/0001-dvd_filesystem.h-fix-off64_t-definition-for-musl.patch b/meta-multimedia/recipes-multimedia/libdvdread/files/0001-dvd_filesystem.h-fix-off64_t-definition-for-musl.patch new file mode 100644 index 0000000000..e73e93ed38 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libdvdread/files/0001-dvd_filesystem.h-fix-off64_t-definition-for-musl.patch @@ -0,0 +1,39 @@ +From: Khem Raj +Date: Tue, 29 Sep 2026 02:05:57 +0000 +Subject: [PATCH] dvd_filesystem.h: fix off64_t definition for musl + +dvd_filesystem.h defines off64_t itself for _MSC_VER, __GLIBC__, and a +fixed list of BSD-like libcs (Apple, FreeBSD, OpenBSD, NetBSD, +DragonFly) whose off_t is already 64-bit. musl falls into none of +these branches, so off64_t stays undeclared, which breaks any +consumer of this public installed header (e.g. libdvdnav): + +| dvd_filesystem.h:87:5: error: type name requires a specifier or qualifier +| dvd_filesystem.h:87:39: error: unknown type name 'off64_t'; did you mean 'off_t'? + +musl's off_t is also already 64-bit (there is no separate LFS64 API), +same as the BSDs/Apple, so replace the closed list of libcs with a +catch-all "else", covering musl (and any other libc in the same +situation) alongside the ones already listed. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/dvdread/dvd_filesystem.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/dvdread/dvd_filesystem.h b/src/dvdread/dvd_filesystem.h +index 1111111..2222222 100644 +--- a/src/dvdread/dvd_filesystem.h ++++ b/src/dvdread/dvd_filesystem.h +@@ -37,8 +37,9 @@ + #elif defined(__GLIBC__) + /* sys/types.h may have been included before _LARGEFILE64_SOURCE was defined. */ + typedef __off64_t off64_t; +-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) +-/* off_t is already 64 bit here so off64_t is not provided. */ ++#else ++/* musl (and the BSDs, and Apple's libc) do not provide the glibc LFS64 ++ * off64_t name; their off_t is already 64 bit, so it can be used as-is. */ + typedef off_t off64_t; + #endif diff --git a/meta-multimedia/recipes-multimedia/libdvdread/libdvdread_7.1.1.bb b/meta-multimedia/recipes-multimedia/libdvdread/libdvdread_7.1.1.bb index f57515f732..7b644a1265 100644 --- a/meta-multimedia/recipes-multimedia/libdvdread/libdvdread_7.1.1.bb +++ b/meta-multimedia/recipes-multimedia/libdvdread/libdvdread_7.1.1.bb @@ -3,7 +3,9 @@ SECTION = "libs/multimedia" LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=64e753fa7d1ca31632bc383da3b57c27" -SRC_URI = "https://download.videolan.org/pub/videolan/libdvdread/${PV}/libdvdread-${PV}.tar.xz" +SRC_URI = "https://download.videolan.org/pub/videolan/libdvdread/${PV}/libdvdread-${PV}.tar.xz \ + file://0001-dvd_filesystem.h-fix-off64_t-definition-for-musl.patch \ +" SRC_URI[sha256sum] = "a0d47876548bec806774bbf8dbf20bb19ba139464383156b32eb8e59915b90a9" inherit meson lib_package binconfig pkgconfig manpages