From 21d6550942bfe33d084406ae879d5935089393c8 Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Tue, 23 Jan 2024 14:06:28 +0100 Subject: [PATCH] dev-ruby/ruby-shout: fix compilation with modern c errno is already defined in ruby header files so it cannot be used for an int variable. Closes: https://bugs.gentoo.org/922746 Signed-off-by: Hans de Graaff --- .../ruby-shout/files/ruby-shout-2.2.2-errno.patch | 13 +++++++++++++ dev-ruby/ruby-shout/ruby-shout-2.2.2-r2.ebuild | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 dev-ruby/ruby-shout/files/ruby-shout-2.2.2-errno.patch diff --git a/dev-ruby/ruby-shout/files/ruby-shout-2.2.2-errno.patch b/dev-ruby/ruby-shout/files/ruby-shout-2.2.2-errno.patch new file mode 100644 index 0000000000000..91e484ab42958 --- /dev/null +++ b/dev-ruby/ruby-shout/files/ruby-shout-2.2.2-errno.patch @@ -0,0 +1,13 @@ +--- a/ext/shout_ext.c 2024-01-23 14:02:08.404056464 +0100 ++++ b/ext/shout_ext.c 2024-01-23 14:03:47.152700002 +0100 +@@ -91,8 +91,8 @@ + /* For metadata-related errors, which don't relate to a shout_t, so we can't + * use shout_get_errno or shout_get_error on them. + */ +-static void raise_nonspecific_shout_error(int errno) { +- rb_raise(cShoutError, "%d", errno); ++static void raise_nonspecific_shout_error(int err_no) { ++ rb_raise(cShoutError, "%d", err_no); + } + + /* diff --git a/dev-ruby/ruby-shout/ruby-shout-2.2.2-r2.ebuild b/dev-ruby/ruby-shout/ruby-shout-2.2.2-r2.ebuild index 4297a213750e9..59543decf60d9 100644 --- a/dev-ruby/ruby-shout/ruby-shout-2.2.2-r2.ebuild +++ b/dev-ruby/ruby-shout/ruby-shout-2.2.2-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,3 +23,5 @@ IUSE="" RDEPEND+=" >=media-libs/libshout-2.0" DEPEND+=" >=media-libs/libshout-2.0" + +PATCHES=( "${FILESDIR}/${P}-errno.patch" )