From e557b0fbac9a198149d2cdc5919adbacd0799789 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Mon, 5 Oct 2020 08:31:20 -0400 Subject: [PATCH] Only check __STDC_VERSION__ if __cplusplus is not defined --- src/lv_misc/lv_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_misc/lv_types.h b/src/lv_misc/lv_types.h index a277d57eb..92c75ee39 100644 --- a/src/lv_misc/lv_types.h +++ b/src/lv_misc/lv_types.h @@ -18,7 +18,7 @@ extern "C" { * DEFINES *********************/ -#if __STDC_VERSION__ >= 199901L // If c99 or newer, use stdint.h to determine arch size +#if defined(__cplusplus) || __STDC_VERSION__ >= 199901L // If c99 or newer, use stdint.h to determine arch size #include #endif @@ -53,7 +53,7 @@ typedef uint8_t lv_res_t; -#if __STDC_VERSION__ >= 199901L +#if defined(__cplusplus) || __STDC_VERSION__ >= 199901L // If c99 or newer, use the definition of uintptr_t directly from typedef uintptr_t lv_uintptr_t;