From 0c9099e004f28fcf3f93f456cbaa395187d2898a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 24 Aug 2021 11:52:08 -0400 Subject: [PATCH] Fix signature of dummy realloc() for STB_VORBIS_NO_CRT --- 1198.patch | 24 ++++++++++++++++++++++++ stb.spec | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 1198.patch diff --git a/1198.patch b/1198.patch new file mode 100644 index 0000000..b94d2be --- /dev/null +++ b/1198.patch @@ -0,0 +1,24 @@ +From f9a5eaee846f1a19fbcda2f5adb5238a94cbbc2f Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Tue, 24 Aug 2021 11:45:48 -0400 +Subject: [PATCH] Fix signature of dummy realloc() for STB_VORBIS_NO_CRT + +--- + stb_vorbis.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/stb_vorbis.c b/stb_vorbis.c +index 3e5c2504c..c1703426e 100644 +--- a/stb_vorbis.c ++++ b/stb_vorbis.c +@@ -594,8 +594,8 @@ enum STBVorbisError + #else // STB_VORBIS_NO_CRT + #define NULL 0 + #define malloc(s) 0 +- #define free(s) ((void) 0) +- #define realloc(s) 0 ++ #define free(p) ((void) 0) ++ #define realloc(p, s) 0 + #endif // STB_VORBIS_NO_CRT + + #include diff --git a/stb.spec b/stb.spec index 84aab39..c3bfa2c 100644 --- a/stb.spec +++ b/stb.spec @@ -46,6 +46,10 @@ Patch1: %{forgeurl}/pull/1195.patch # https://github.com/nothings/stb/pull/1196 Patch2: %{forgeurl}/pull/1196.patch +# Fix signature of dummy realloc() for STB_VORBIS_NO_CRT +# https://github.com/nothings/stb/pull/1198 +Patch3: %{forgeurl}/pull/1198.patch + %global stb_c_lexer_version 0.12 %global stb_connected_components_version 0.96 %global stb_divide_version 0.94