diff options
author | x7upLime <andrew@andrewdomain.com> | 2023-07-21 01:09:47 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2023-07-22 08:37:51 +0200 |
commit | 84011e51778257bb65cfce4adde9833f64ed596c (patch) | |
tree | 452a255a4b186e2d13457d73bc04cad59b3ea6eb /media-sound/audacious | |
parent | profiles/package.mask: mask dev-ruby/fast_xs for removal (diff) | |
download | gentoo-84011e51778257bb65cfce4adde9833f64ed596c.tar.gz gentoo-84011e51778257bb65cfce4adde9833f64ed596c.tar.bz2 gentoo-84011e51778257bb65cfce4adde9833f64ed596c.zip |
media-sound/audacious: VFS_SEEK enum backporting
backported from:
https://github.com/audacious-media-player/audacious/pull/64
Closes: https://bugs.gentoo.org/896412
Signed-off-by: Andrei Corduneanu <andrew@andrewdomain.com>
Closes: https://github.com/gentoo/gentoo/pull/31980
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'media-sound/audacious')
-rw-r--r-- | media-sound/audacious/audacious-4.3.1.ebuild | 4 | ||||
-rw-r--r-- | media-sound/audacious/files/audacious-enum-backporting.patch | 35 |
2 files changed, 39 insertions, 0 deletions
diff --git a/media-sound/audacious/audacious-4.3.1.ebuild b/media-sound/audacious/audacious-4.3.1.ebuild index ee999ce83200..591c2b60ab94 100644 --- a/media-sound/audacious/audacious-4.3.1.ebuild +++ b/media-sound/audacious/audacious-4.3.1.ebuild @@ -33,6 +33,10 @@ PDEPEND="~media-plugins/audacious-plugins-${PV}" S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-enum-backporting.patch +) + src_prepare() { default if ! use nls; then diff --git a/media-sound/audacious/files/audacious-enum-backporting.patch b/media-sound/audacious/files/audacious-enum-backporting.patch new file mode 100644 index 000000000000..66bb959f737e --- /dev/null +++ b/media-sound/audacious/files/audacious-enum-backporting.patch @@ -0,0 +1,35 @@ +From 3989bafcb7a8843cef4e25875cd6c0e72680ad80 Mon Sep 17 00:00:00 2001 +From: Guido Falsi <mad@madpilot.net> +Date: Wed, 28 Jun 2023 15:42:37 +0200 +Subject: [PATCH] Add missing enum value. + +New versions of the clang compiler have strict checks for enum values. + +The value "-1" is returned as a last resort from to_vfs_seek_type() as a VFSSeekType. + +Replace usage of `-1` with the new enum name. +--- + src/libaudcore/vfs.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/libaudcore/vfs.h b/src/libaudcore/vfs.h +index 33c5a65c97..f6a1dd3f23 100644 +--- a/src/libaudcore/vfs.h ++++ b/src/libaudcore/vfs.h +@@ -51,6 +51,7 @@ enum VFSReadOptions + + enum VFSSeekType + { ++ VFS_SEEK_INVALID = -1, + VFS_SEEK_SET = 0, + VFS_SEEK_CUR = 1, + VFS_SEEK_END = 2 +@@ -75,7 +76,7 @@ constexpr VFSSeekType to_vfs_seek_type(int whence) + ? VFS_SEEK_SET + : (whence == SEEK_CUR) + ? VFS_SEEK_CUR +- : (whence == SEEK_END) ? VFS_SEEK_END : (VFSSeekType)-1; ++ : (whence == SEEK_END) ? VFS_SEEK_END : VFS_SEEK_INVALID; + } + + #endif // WANT_VFS_STDIO_COMPAT |