Fix signature of dummy realloc() for STB_VORBIS_NO_CRT

This commit is contained in:
Benjamin A. Beasley 2021-08-24 11:52:08 -04:00
parent 34c7b7460f
commit af69118cf6
2 changed files with 32 additions and 1 deletions

24
1198.patch Normal file
View File

@ -0,0 +1,24 @@
From f9a5eaee846f1a19fbcda2f5adb5238a94cbbc2f Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
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 <limits.h>

View File

@ -21,7 +21,7 @@ Name: stb
# https://github.com/nothings/stb/issues/1101
Version: 0
%forgemeta
Release: 0.3%{?dist}
Release: 0.4%{?dist}
Summary: Single-file public domain libraries for C/C++
# See LICENSE.
@ -47,6 +47,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
@ -802,6 +806,9 @@ EOF
%changelog
* Tue Aug 24 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0-0.4
- Fix signature of dummy realloc() for STB_VORBIS_NO_CRT
* Mon Aug 23 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0-0.3
- Use symlinks so including "stb_foo.h" and "stb/stb_foo.h" both work