File: 0010-Fix-build-with-GCC-15.patch

package info (click to toggle)
newlisp 10.7.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,292 kB
  • sloc: ansic: 33,280; lisp: 4,181; sh: 609; makefile: 215
file content (34 lines) | stat: -rw-r--r-- 974 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Sergio Durigan Junior <sergiodj@debian.org>
Date: Sat, 27 Sep 2025 12:09:50 -0400
Subject: Fix build with GCC 15

This is a hack to fix the build with GCC 15, which complains about the
number of arguments being passed to "function" in nl-import.c's
cldeclFunction.

The idea is to turn the function declaration into a variadic one, so
that GCC accepts various numbers of arguments.  Not pretty, but it
works.

Forwarded: no
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097457
---
 nl-import.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nl-import.c b/nl-import.c
index 9249e54..f4ddcce 100644
--- a/nl-import.c
+++ b/nl-import.c
@@ -247,9 +247,9 @@ return(stuffInteger(cdeclFunction(pCell->contents, args, count)));
 
 UINT cdeclFunction(UINT fAddress, UINT * args, int count)
 {
-UINT (*function)();
+UINT (*function)(...);
 
-function = (UINT (*)())fAddress;
+function = (UINT (*)(...))fAddress;
 
 switch(count)
     {