libretro-bsnes: fix build with gcc-13

This commit is contained in:
Rudi Heitbaum 2023-04-26 16:30:06 +00:00
parent b7e1d96e98
commit cba5fb23c0

View File

@ -0,0 +1,26 @@
From e15e3e639b86579775b30dd088eb3880341b9bbe Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Thu, 27 Apr 2023 02:27:49 +1000
Subject: [PATCH] Fix build with gcc-13
Error was:
In file included from ../nall/arithmetic.hpp:69:
../nall/arithmetic/natural.hpp: In function 'void nall::div(const uint4096_t&, const uint4096_t&, uint4096_t&, uint4096_t&)':
../nall/arithmetic/natural.hpp:239:23: error: 'runtime_error' is not a member of 'std'
239 | if(!rhs) throw std::runtime_error("division by zero");
| ^~~~~~~~~~~~~
../nall/arithmetic/natural.hpp:239:23: note: 'std::runtime_error' is defined in header '<stdexcept>'; did you forget to '#include <stdexcept>'?
---
nall/arithmetic/natural.hpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nall/arithmetic/natural.hpp b/nall/arithmetic/natural.hpp
index fcc902b8d..cc1bd907c 100644
--- a/nall/arithmetic/natural.hpp
+++ b/nall/arithmetic/natural.hpp
@@ -1,3 +1,5 @@
+#include <stdexcept>
+
#define ConcatenateType(Size) uint##Size##_t
#define DeclareType(Size) ConcatenateType(Size)