[packages/perl-SDL] add type fixes from fedora

atler atler at pld-linux.org
Wed Aug 12 23:50:27 CEST 2026


commit 44f3ee8403658b268622495846d47a6753824477
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Aug 12 23:49:23 2026 +0200

    add type fixes from fedora

 perl-SDL.spec |  2 ++
 types.patch   | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
---
diff --git a/perl-SDL.spec b/perl-SDL.spec
index 6d99af5..1559958 100644
--- a/perl-SDL.spec
+++ b/perl-SDL.spec
@@ -13,6 +13,7 @@ Source0:	http://www.cpan.org/modules/by-authors/id/D/DG/DGOEHRIG/SDL_Perl-%{vers
 # Source0-md5:	6ce26e1b710ce52def4ec22637cd5176
 Patch0:		%{name}-gfxPie.patch
 Patch1:		%{name}-no-mixertest.patch
+Patch2:		types.patch
 URL:		http://search.cpan.org/dist/SDL_Perl/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	SDL-devel
@@ -49,6 +50,7 @@ swobody z API SDL i próbuje się dopasować do idei SDL oraz Perla.
 %setup -q -n SDL_Perl-%{version}
 %patch -P0 -p0
 %patch -P1 -p1
+%patch -P2 -p1
 
 mv t/mixerpm.t{,.blah}	# requires audio device
 
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..e925c62
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,60 @@
+From 2a1eb99101a89e46c13b75b08a4c685e0f7425fe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 11 Feb 2025 12:14:27 +0100
+Subject: [PATCH] Fix building in ISO C23
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Building with GCC 15, which defaults to ISO C23, failed like this:
+
+    In file included from lib/SDL_perl.xs:32:
+    lib/SDL_perl.c:654:13: error: conflicting types for ‘boot_SDL’; have ‘void(PerlInterpreter *, CV *)’ {aka ‘void(struct interpreter *, struct cv *)’}
+      654 | XS_EXTERNAL(boot_SDL); /* prototype to pass -Wmissing-prototypes */
+	  |             ^~~~~~~~
+    /usr/lib64/perl5/CORE/XSUB.h:149:34: note: in definition of macro ‘XS_EXTERNAL’
+      149 | #  define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
+	  |                                  ^~~~
+    lib/SDL_perl.xs:147:6: note: previous declaration of ‘boot_SDL’ with type ‘void(void)’
+      147 | void boot_SDL();
+	  |      ^~~~~~~~
+    lib/SDL_perl.c:655:13: error: conflicting types for ‘boot_SDL’; have ‘void(PerlInterpreter *, CV *)’ {aka ‘void(struct interpreter *, struct cv *)’}
+      655 | XS_EXTERNAL(boot_SDL)
+	  |             ^~~~~~~~
+    /usr/lib64/perl5/CORE/XSUB.h:149:34: note: in definition of macro ‘XS_EXTERNAL’
+      149 | #  define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
+	  |                                  ^~~~
+    lib/SDL_perl.xs:147:6: note: previous declaration of ‘boot_SDL’ with type ‘void(void)’
+      147 | void boot_SDL();
+	  |      ^~~~~~~~
+
+The cause is a mismatch between how boot_SDL() was declared and used
+in src/SDL.xs and how Perl generates a boot function for XS packages.
+This patch fixes it by passing current Perl interpreter and, probably
+ignored, cv argument.
+
+Resolves: https://github.com/PerlGameDev/SDL/issues/294
+Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2341036
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ src/SDL.xs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- SDL_Perl-2.1.3/src/SDL.xs.orig	2026-08-12 21:57:09.047828287 +0200
++++ SDL_Perl-2.1.3/src/SDL.xs	2026-08-12 23:44:18.666942191 +0200
+@@ -190,13 +190,13 @@
+ #endif
+ }
+ 
+-void boot_SDL();
++XS(boot_SDL);
+ void boot_SDL__OpenGL();
+ 
+ XS(boot_SDL_perl)
+ {
+ 	GET_TLS_CONTEXT
+-	boot_SDL();
++	boot_SDL(aTHX_ cv);
+ }
+ 
+ MODULE = SDL_perl	PACKAGE = SDL
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-SDL.git/commitdiff/44f3ee8403658b268622495846d47a6753824477



More information about the pld-cvs-commit mailing list