Files
ninvaders/ninvaders-sighandler_t.patch
Dirk Stoecker 74d58b6129 - Backport ninvaders-fix-render-loop.patch: Fix buffer overflow in
render() function. Same as buffer_owerflow.patch, but with fixed
  patchfile name and updated PATCH-FIX-UPSTREAM.
  Adapted from https://sourceforge.net/p/ninvaders/bugs/2/
- Remove buffer_owerflow.patch: Obsoleted by ninvaders-fix-render-loop.patch.
- Modify ninvaders-obey-cflags.patch: Add missing PATCH-FIX-UPSTREAM comment
  in spec file.
- Backport ninvaders-fix-multiple-definitions.patch: Fix link-time
  error from multiple definitions of the same symbols in various
  object files.
  Adapted from https://sourceforge.net/p/ninvaders/bugs/2/
- Add ninvaders-sighandler_t.patch: Fix function signature of the
  signal handler. The correct signature expects an integer argument,
  which is currently missing. Resolves compile-time errors.
- Add ninvaders-fix-doSleep-decl.patch: Harmonize conflicting
  declarations of doSleep(). The function expects an integer argument,
  which is currently missing in the declarations. Resolves compile-time
  errors.
- Refresh existing patches accordingly

OBS-URL: https://build.opensuse.org/package/show/games/ninvaders?expand=0&rev=7
2025-07-17 06:46:23 +00:00

22 lines
763 B
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Fixes the compile-time error show below.
[ 5s] nInvaders.c: In function setUpTimer:
[ 5s] nInvaders.c:323:29: error: assignment to __sighandler_t {aka void (*)(int)} from incompatible pointer type void (*)(void) [-Wincompatible-pointer-types]
[ 5s] 323 | myAction.sa_handler = &handleTimer;
[ 5s] |
---
Index: ninvaders-0.1.1/nInvaders.c
===================================================================
--- ninvaders-0.1.1.orig/nInvaders.c
+++ ninvaders-0.1.1/nInvaders.c
@@ -211,7 +211,7 @@ void readInput()
* timer
* this method is executed every 1 / FPS seconds
*/
-void handleTimer()
+void handleTimer(int signum)
{
static int aliens_move_counter = 0;
static int aliens_shot_counter = 0;