Fix offsetof causing intellisense errors

This commit is contained in:
LagoLunatic
2023-12-22 20:13:00 -05:00
parent ed66f75566
commit 7a80acf503
+2 -1
View File
@@ -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]