aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-07-15 22:02:32 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-07-15 22:02:32 +0000
commit4c9a857a2aa145de56f188e6269cfa1dfcf09f30 (patch)
tree0603f5f370e3da5df2a3954bebfefc139f4c4632 /games
parentb951f4219021502e790e1c1281cdb141dd2ac3b8 (diff)
downloadports-4c9a857a2aa145de56f188e6269cfa1dfcf09f30.tar.gz
ports-4c9a857a2aa145de56f188e6269cfa1dfcf09f30.zip
games/egoboo: fix build on big-endian architectures
md2.c:514:42: warning: implicit declaration of function 'SDL_swap32' is invalid in C99 [-Wimplicit-function-declaration] cmd->data[i].index = SDL_swap32( cmd->data[i].s ); ld: error: undefined symbol: SDL_swap32 >>> referenced by md2.c >>> md2.o:(md2_load) cc: error: linker command failed with exit code 1 (use -v to see invocation)
Diffstat (limited to 'games')
-rw-r--r--games/egoboo/files/patch-src_game_md2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/games/egoboo/files/patch-src_game_md2.c b/games/egoboo/files/patch-src_game_md2.c
new file mode 100644
index 000000000000..a2feaab43c69
--- /dev/null
+++ b/games/egoboo/files/patch-src_game_md2.c
@@ -0,0 +1,11 @@
+--- src/game/md2.c.orig 2021-07-15 21:58:55 UTC
++++ src/game/md2.c
+@@ -511,7 +511,7 @@ MD2_Model_t* md2_load( const char * szFilename, MD2_Mo
+ int i;
+ for ( i = 0; i < cmd->command_count; i++ )
+ {
+- cmd->data[i].index = SDL_swap32( cmd->data[i].s );
++ cmd->data[i].index = SDL_Swap32( cmd->data[i].s );
+ cmd->data[i].s = ENDIAN_FLOAT( cmd->data[i].s );
+ cmd->data[i].t = ENDIAN_FLOAT( cmd->data[i].t );
+ };