1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-20 09:45:12 +03:00
aports/community/lbreakouthd/gcc14-implicit-function-declaration.patch

36 lines
1.3 KiB
Diff

Fix -Wimplicit-function-declaration error with gcc 14.
````
paddle.c: In function 'paddle_freeze':
paddle.c:98:9: error: implicit declaration of function 'SDL_GetRelativeMouseState' [-Wimplicit-function-declaration]
98 | SDL_GetRelativeMouseState( &freeze, &freeze );
| ^~~~~~~~~~~~~~~~~~~~~~~~~
```
```
balls.c: In function 'ball_check_brick_reflection':
balls.c:202:48: error: implicit declaration of function 'SDL_GetTicks' [-Wimplicit-function-declaration]
202 | b->paddle->last_ball_contact = SDL_GetTicks();
| ^~~~~~~~~~~~
````
--- lbreakouthd-1.1.9-origin/libgame/balls.c
+++ lbreakouthd-1.1.9/libgame/balls.c
@@ -15,6 +15,7 @@
* *
***************************************************************************/
+#include <SDL2/SDL_timer.h>
#include "gamedefs.h"
#include "levels.h"
#include "paddle.h"
--- lbreakouthd-1.1.9-origin/libgame/paddle.c
+++ lbreakouthd-1.1.9/libgame/paddle.c
@@ -15,6 +15,7 @@
* *
***************************************************************************/
+#include <SDL2/SDL_mouse.h>
#include "gamedefs.h"
#include "shots.h"
#include "paddle.h"