From 7a80acf5033ada4f22b92f6e1a6a0a218ecae155 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Fri, 22 Dec 2023 20:13:00 -0500 Subject: [PATCH] Fix offsetof causing intellisense errors --- include/global.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/global.h b/include/global.h index 7cc77b655..d63cabbeb 100644 --- a/include/global.h +++ b/include/global.h @@ -22,10 +22,11 @@ #define _SDA_BASE_(dummy) 0 #define _SDA2_BASE_(dummy) 0 -#ifndef __INTELLISENSE__ #ifndef offsetof #define offsetof(type, member) ((size_t) & (((type*)0)->member)) #endif + +#ifndef __INTELLISENSE__ #define GLUE(a, b) a##b #define GLUE2(a, b) GLUE(a, b) #define STATIC_ASSERT(cond) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]