From 0b6f3678e58ebfa075f88803933c85c685b74a2f Mon Sep 17 00:00:00 2001
From: Bernd Machenschalk <bernd.machenschalk@aei.mpg.de>
Date: Fri, 19 Feb 2021 16:28:46 +0100
Subject: [PATCH] fix API build for C apps

-  protect bool variable in cplusplus in diagnostics.h
---
 lib/diagnostics.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/diagnostics.h b/lib/diagnostics.h
index 361b87bb8d..8cc69c9442 100644
--- a/lib/diagnostics.h
+++ b/lib/diagnostics.h
@@ -34,7 +34,9 @@
 #include <dlfcn.h>
 #endif
 
+#ifdef __cplusplus
 extern bool main_exited;
+#endif
 
 // some of the Android stuff below causes seg faults on some devices.
 // Disable by default.
-- 
GitLab