From 0acf443f68f81a62919c3efd524f6e93eaa5379e Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Fri, 10 Jan 2025 06:49:26 +0000 Subject: [PATCH] libcdio: update to 2.1.1 --- packages/audio/libcdio/package.mk | 6 +- ...tmntent-setmntent-for-reading-mounts.patch | 68 ------------------- 2 files changed, 3 insertions(+), 71 deletions(-) delete mode 100644 packages/audio/libcdio/patches/0001-Use-getmntent-setmntent-for-reading-mounts.patch diff --git a/packages/audio/libcdio/package.mk b/packages/audio/libcdio/package.mk index be32fcd227..26623fc9e2 100644 --- a/packages/audio/libcdio/package.mk +++ b/packages/audio/libcdio/package.mk @@ -3,11 +3,11 @@ # Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv) PKG_NAME="libcdio" -PKG_VERSION="2.1.0" -PKG_SHA256="8550e9589dbd594bfac93b81ecf129b1dc9d0d51e90f9696f1b2f9b2af32712b" +PKG_VERSION="2.1.1" +PKG_SHA256="d3a7230f6804d5a84bf9805ed4a0de705b156299510c8085ae1fc693ca239f87" PKG_LICENSE="GPLv3" PKG_SITE="https://www.gnu.org/software/libcdio/" -PKG_URL="https://ftpmirror.gnu.org/libcdio/${PKG_NAME}-${PKG_VERSION}.tar.bz2" +PKG_URL="https://github.com/libcdio/libcdio/releases/download/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2" PKG_DEPENDS_TARGET="toolchain" PKG_LONGDESC="A CD-ROM reading and control library." PKG_BUILD_FLAGS="+pic" diff --git a/packages/audio/libcdio/patches/0001-Use-getmntent-setmntent-for-reading-mounts.patch b/packages/audio/libcdio/patches/0001-Use-getmntent-setmntent-for-reading-mounts.patch deleted file mode 100644 index 764ee883d2..0000000000 --- a/packages/audio/libcdio/patches/0001-Use-getmntent-setmntent-for-reading-mounts.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 0d550dc9307901edd817333a5b530241d08ad889 Mon Sep 17 00:00:00 2001 -From: Miguel Borges de Freitas -Date: Wed, 2 Feb 2022 20:47:02 +0000 -Subject: [PATCH] Use getmntent/setmntent for reading mounts - -Since fields in the mtab and fstab files are separated by -whitespace, octal escapes are used to represent the characters -space (\040), tab (\011), newline (\012), and backslash (\\) in -those files when they occur in one of the four strings in a -mntent structure. The routines addmntent() and getmntent() will -convert from string representation to escaped representation and -back. When converting from escaped representation, the sequence -\134 is also converted to a backslash. ---- - lib/driver/gnu_linux.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/lib/driver/gnu_linux.c b/lib/driver/gnu_linux.c -index 6a6aa4dd..dddf333c 100644 ---- a/lib/driver/gnu_linux.c -+++ b/lib/driver/gnu_linux.c -@@ -672,13 +672,13 @@ static int is_mounted (const char * device, char * target) { - char real_device_1[PATH_MAX]; - char real_device_2[PATH_MAX]; - -- char file_device[PATH_MAX]; -- char file_target[PATH_MAX]; -+ struct mntent *fs; -+ -+ fp = setmntent("/proc/mounts", "r"); - -- fp = fopen ( "/proc/mounts", "r"); - /* Older systems just have /etc/mtab */ - if(!fp) -- fp = fopen ( "/etc/mtab", "r"); -+ fp = setmntent("/etc/mtab", "r"); - - /* Neither /proc/mounts nor /etc/mtab could be opened, give up here */ - if(!fp) return 0; -@@ -691,19 +691,19 @@ static int is_mounted (const char * device, char * target) { - - /* Read entries */ - -- while ( fscanf(fp, "%s %s %*s %*s %*d %*d\n", file_device, file_target) != EOF ) { -- if (NULL == cdio_realpath(file_device, real_device_2)) { -+ while ((fs = getmntent(fp)) != NULL) { -+ if (NULL == cdio_realpath(fs->mnt_fsname, real_device_2)) { - cdio_debug("Problems resolving device %s: %s\n", -- file_device, strerror(errno)); -+ fs->mnt_fsname, strerror(errno)); - } - if(!strcmp(real_device_1, real_device_2)) { -- strcpy(target, file_target); -- fclose(fp); -+ strcpy(target, fs->mnt_dir); -+ endmntent(fp); - return 1; - } - - } -- fclose(fp); -+ endmntent(fp); - return 0; - } - --- -2.30.2 -