From 0c08e89cdb32fa9ab677d711df989dcd5856f4d2 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <[email protected]>
Date: Mon, 12 Dec 2022 19:43:17 +0530
Subject: [PATCH] headers: Include typeinfo in eh.h for std::type_info

Fixes https://github.com/mingw-w64/mingw-w64/issues/18

Signed-off-by: Biswapriyo Nath <[email protected]>
---
 mingw-w64-headers/crt/eh.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/crt/eh.h b/mingw-w64-headers/crt/eh.h
index 4a3f35e..71198ec 100644
--- a/mingw-w64-headers/crt/eh.h
+++ b/mingw-w64-headers/crt/eh.h
@@ -3,6 +3,13 @@
  * This file is part of the mingw-w64 runtime package.
  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  */
+
+#ifndef __cplusplus
+#error eh.h is only for C++!
+#endif
+
+#include <typeinfo>
+
 #include <crtdefs.h>
 
 #ifndef _EH_H_
@@ -12,10 +19,6 @@
 
 #pragma pack(push,_CRT_PACKING)
 
-#ifndef __cplusplus
-#error eh.h is only for C++!
-#endif
-
 typedef void (__cdecl *terminate_function)();
 typedef void (__cdecl *terminate_handler)();
 typedef void (__cdecl *unexpected_function)();
-- 
2.38.1

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to