From 76485a090957522fc5207915d9dab5c220362597 Mon Sep 17 00:00:00 2001
From: obones <obones@free.fr>
Date: Tue, 31 Jan 2023 11:40:28 +0100
Subject: [PATCH] Fix pointer restrict for C++ compilers (#2351)

---
 include/r_util.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/r_util.h b/include/r_util.h
index 3236350f..0fc8c25a 100644
--- a/include/r_util.h
+++ b/include/r_util.h
@@ -17,8 +17,8 @@
 #include <time.h>
 #include "compat_time.h"
 
-#if defined _MSC_VER || defined ESP32 // Microsoft Visual Studio or ESP32
-    // MSC and ESP32 have something like C99 restrict as __restrict
+#if defined _MSC_VER || defined __cplusplus // Microsoft Visual Studio or C++ compilers (G++ is used by ESP32, ESP8266...)
+    // MSC and C++ compilers have something like C99 restrict as __restrict
     #ifndef restrict
     #define restrict  __restrict
     #endif