diff --git a/berusky2-mmalloc.patch b/berusky2-mmalloc.patch new file mode 100644 index 0000000..c64125e --- /dev/null +++ b/berusky2-mmalloc.patch @@ -0,0 +1,23 @@ +diff -up berusky2-0.10/src/age/utils/mem_alloc.cpp.old berusky2-0.10/src/age/utils/mem_alloc.cpp +--- berusky2-0.10/src/age/utils/mem_alloc.cpp.old 2017-06-30 14:53:05.488187650 +0200 ++++ berusky2-0.10/src/age/utils/mem_alloc.cpp 2017-06-30 14:52:49.680246977 +0200 +@@ -32,6 +32,19 @@ + extern "C" { + #endif + ++void * mmalloc(size_t velikost) ++{ ++ void *p_mem = malloc(velikost); ++ if(p_mem) { ++ memset(p_mem, 0, velikost); ++ return(p_mem); ++ } ++ else ++ { ++ return(NULL); ++ } ++} ++ + char * sstrdup(char *p_src) + { + char *p_tmp = strdup(p_src); diff --git a/berusky2.spec b/berusky2.spec index 9309b44..dd2693a 100644 --- a/berusky2.spec +++ b/berusky2.spec @@ -10,6 +10,7 @@ Source2: berusky2.png Patch0: berusky2-anim-crash.patch Patch1: berusky2-gcc6.patch Patch2: berusky2-gcc7.patch +Patch3: berusky2-mmalloc.patch URL: http://www.anakreon.cz/en/Berusky2.htm Requires: berusky2-data >= 0.9 @@ -34,6 +35,7 @@ which increases throughout the game. %patch0 -p1 -b .anim-crash %patch1 -p1 -b .gcc %patch2 -p1 -b .gcc7 +%patch3 -p1 -b .mmalloc %build %configure CFLAGS="$RPM_OPT_FLAGS" @@ -90,6 +92,7 @@ fi %changelog * Fri Jun 30 2017 Martin Stransky 0.10-13 - gcc7 build fix +- mmalloc link patch * Fri Feb 10 2017 Fedora Release Engineering - 0.10-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild