logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

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. unix.c | 4 ++--
  7. 1 file changed, 2 insertions(+), 2 deletions(-)
  8. diff --git a/unix.c b/unix.c
  9. index 3f7bf9d..7052075 100644
  10. --- a/unix.c
  11. +++ b/unix.c
  12. @@ -402,7 +402,7 @@ gettrap(int sig)
  13. ntrap++;
  14. if(ntrap>=NSIG){
  15. pfmt(err, "rc: Too many traps (trap %d), dumping core\n", sig);
  16. - signal(SIGABRT, (void (*)())0);
  17. + signal(SIGABRT, (void (*)(int))0);
  18. kill(getpid(), SIGABRT);
  19. }
  20. }
  21. @@ -411,7 +411,7 @@ void
  22. Trapinit(void)
  23. {
  24. int i;
  25. - void (*sig)();
  26. + void (*sig)(int);
  27. if(1 || flag['d']){ /* wrong!!! */
  28. sig = signal(SIGINT, gettrap);
  29. --
  30. 2.49.0