Fix compile error on riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
ef095c651c
commit
b5deba8fa5
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/stb_sprintf.h b/stb_sprintf.h
|
||||||
|
index ca432a6..fb49e4d 100644
|
||||||
|
--- a/stb_sprintf.h
|
||||||
|
+++ b/stb_sprintf.h
|
||||||
|
@@ -230,7 +230,7 @@ STBSP__PUBLICDEC void STB_SPRINTF_DECORATE(set_separators)(char comma, char peri
|
||||||
|
#define stbsp__uint16 unsigned short
|
||||||
|
|
||||||
|
#ifndef stbsp__uintptr
|
||||||
|
-#if defined(__ppc64__) || defined(__powerpc64__) || defined(__aarch64__) || defined(_M_X64) || defined(__x86_64__) || defined(__x86_64) || defined(__s390x__)
|
||||||
|
+#if defined(__ppc64__) || defined(__powerpc64__) || defined(__aarch64__) || defined(_M_X64) || defined(__x86_64__) || defined(__x86_64) || defined(__s390x__) || defined(__LP64__) || (defined(__riscv) && __riscv_xlen == 64)
|
||||||
|
#define stbsp__uintptr stbsp__uint64
|
||||||
|
#else
|
||||||
|
#define stbsp__uintptr stbsp__uint32
|
6
stb.spec
6
stb.spec
|
@ -24,7 +24,7 @@ Name: stb
|
||||||
# https://github.com/nothings/stb/issues/1101
|
# https://github.com/nothings/stb/issues/1101
|
||||||
%global snapinfo ^%{snapdate}git%(echo '%{commit}' | cut -b -7)
|
%global snapinfo ^%{snapdate}git%(echo '%{commit}' | cut -b -7)
|
||||||
Version: 0%{snapinfo}
|
Version: 0%{snapinfo}
|
||||||
Release: %autorelease -p
|
Release: %autorelease -p -e 0.riscv64
|
||||||
Summary: Single-file public domain libraries for C/C++
|
Summary: Single-file public domain libraries for C/C++
|
||||||
|
|
||||||
# See LICENSE.
|
# See LICENSE.
|
||||||
|
@ -105,6 +105,10 @@ Patch: %{url}/pull/1236.patch
|
||||||
# https://github.com/nothings/stb/pull/1297
|
# https://github.com/nothings/stb/pull/1297
|
||||||
Patch: %{url}/pull/1297.patch
|
Patch: %{url}/pull/1297.patch
|
||||||
|
|
||||||
|
|
||||||
|
# riscv64 compile fix
|
||||||
|
Patch1000: fix-riscv64-compile-uintptr.patch
|
||||||
|
|
||||||
%global stb_c_lexer_version 0.12
|
%global stb_c_lexer_version 0.12
|
||||||
%global stb_connected_components_version 0.96
|
%global stb_connected_components_version 0.96
|
||||||
%global stb_divide_version 0.94
|
%global stb_divide_version 0.94
|
||||||
|
|
Loading…
Reference in New Issue