mcst-linux-kernel/patches-2024.06.26/glib-2.73.3/0002-bug141211-143826-Add_e...

13 lines
393 B
Diff

--- a/glib/glib-typeof.h
+++ b/glib/glib-typeof.h
@@ -36,7 +36,9 @@
#define glib_typeof(t) __typeof__ (t)
#elif defined(__cplusplus) && __cplusplus >= 201103L && GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68
/* C++11 decltype() is close enough for our usage */
+extern "C++" {
#include <type_traits>
+}
#define glib_typeof(t) typename std::remove_reference<decltype (t)>::type
#endif