From 75e522cdbe009f103791e9cefe84f4f96f19c1b7 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 28 Aug 2023 09:37:31 +0300 Subject: [PATCH] Fix 'missing binary operator before token' gc error in gcconfig.h (a cherry-pick of commit 5507e18a5 from 'master') The error occurs only if gcconfig.h is included before include gc.h (as, e.g., done in init_global_static_roots.cpp). * include/private/gcconfig.h [!GC_H && HAVE_CONFIG_H]: Include config.h. * include/private/gcconfig.h [!GC_H]: Include gc.h. --- include/private/gcconfig.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index b2c34d7d6..d1c268f84 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -26,6 +26,13 @@ #ifndef GCCONFIG_H #define GCCONFIG_H +#ifndef GC_H +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif +# include "../gc.h" +#endif + #ifdef CPPCHECK # undef CLOCKS_PER_SEC # undef FIXUP_POINTER