Fix:
lib/SDLx/Surface.xs:25:25: error: implicit declaration of function '_calc_offset' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
https://github.com/PerlGameDev/SDL/pull/299
--- src/SDLx/Surface.xs.orig	2018-05-19 05:55:52.000000000 -0500
+++ src/SDLx/Surface.xs	2022-01-26 02:50:53.000000000 -0600
@@ -16,6 +16,14 @@
 #include <SDL_gfxPrimitives.h>
 #endif
 
+int _calc_offset ( SDL_Surface* surface, int x, int y )
+{
+    int offset;
+    offset  = (surface->pitch * y) / surface->format->BytesPerPixel;
+    offset += x;
+    return offset;
+}
+
 SV * get_pixel32 (SDL_Surface *surface, int x, int y)
 {
     /* Convert the pixels to 32 bit  */
@@ -52,14 +60,6 @@
     return newRV_noinc((SV *)matrix);
 }
 
-int _calc_offset ( SDL_Surface* surface, int x, int y )
-{
-    int offset;
-    offset  = (surface->pitch * y) / surface->format->BytesPerPixel;
-    offset += x;
-    return offset;
-}
-
 unsigned int _get_pixel(SDL_Surface * surface, int offset)
 {
     unsigned int value;
