mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-18 16:47:02 +02:00
http://www.repo.hu/projects/fungw/ C function gateway for different programming languages
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
Patch-Source: https://salsa.debian.org/electronics-team/fungw/-/blob/debian/1.2.1-3.1/debian/patches/add-explicit-void-pointer-cast-for-perl-.patch
|
|
--
|
|
From: Niko Tyni <ntyni@debian.org>
|
|
Date: Fri, 2 Aug 2024 08:44:28 +0100
|
|
X-Dgit-Generated: 1.2.1-3 dd68747f561a8cb027d3a3d53cec0d1d48712da5
|
|
Subject: Add explicit void pointer cast for Perl user data
|
|
|
|
This fixes a compilation error on GCC 14.
|
|
|
|
Quoting https://gcc.gnu.org/gcc-14/porting_to.html
|
|
|
|
GCC no longer allows implicitly casting all pointer types to all
|
|
other pointer types. This behavior is now restricted to the void *
|
|
type and its qualified variations.
|
|
|
|
To fix compilation errors resulting from that, you can add the
|
|
appropriate casts, and maybe consider using void * in more places
|
|
(particularly for old programs that predate the introduction of void *
|
|
into the C language).
|
|
|
|
Bug-Debian: https://bugs.debian.org/1074973
|
|
|
|
---
|
|
|
|
diff --git a/libfungwbind/perl/fungw_perl.c b/libfungwbind/perl/fungw_perl.c
|
|
index 2b3a91e..a8580bc 100644
|
|
--- a/libfungwbind/perl/fungw_perl.c
|
|
+++ b/libfungwbind/perl/fungw_perl.c
|
|
@@ -283,7 +283,7 @@ static int fgws_perl_init(fgw_obj_t *obj, const char *filename, const char *opts
|
|
PERL_SET_CONTEXT(ctx->interp);
|
|
perl_construct(ctx->interp);
|
|
obj->script_data = ctx;
|
|
- ctx->interp->perl_user_data = ctx;
|
|
+ ctx->interp->perl_user_data = (void *)ctx;
|
|
ctx->obj = obj;
|
|
ctx->freg_delay = 1;
|
|
|