opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

0003-Use-complete-function-prototype-to-fix-build-with-C2.patch (797B)


      1 From 39da3936cd5cf89e97de197181a05bb405e114b9 Mon Sep 17 00:00:00 2001
      2 From: Michael Forney <mforney@mforney.org>
      3 Date: Tue, 29 Apr 2025 00:48:53 -0700
      4 Subject: [PATCH] Use complete function prototype to fix build with C23
      5 
      6 ---
      7  unix.c | 4 ++--
      8  1 file changed, 2 insertions(+), 2 deletions(-)
      9 
     10 diff --git a/unix.c b/unix.c
     11 index 3f7bf9d..7052075 100644
     12 --- a/unix.c
     13 +++ b/unix.c
     14 @@ -402,7 +402,7 @@ gettrap(int sig)
     15  	ntrap++;
     16  	if(ntrap>=NSIG){
     17  		pfmt(err, "rc: Too many traps (trap %d), dumping core\n", sig);
     18 -		signal(SIGABRT, (void (*)())0);
     19 +		signal(SIGABRT, (void (*)(int))0);
     20  		kill(getpid(), SIGABRT);
     21  	}
     22  }
     23 @@ -411,7 +411,7 @@ void
     24  Trapinit(void)
     25  {
     26  	int i;
     27 -	void (*sig)();
     28 +	void (*sig)(int);
     29  
     30  	if(1 || flag['d']){	/* wrong!!! */
     31  		sig = signal(SIGINT, gettrap);
     32 -- 
     33 2.49.0
     34