engine: use GCC provided offsetof implementation

This commit is contained in:
Alibek Omarov
2021-10-03 04:26:22 +03:00
parent 8bbd0d5119
commit 08c04200fb
4 changed files with 12 additions and 8 deletions

View File

@@ -28,8 +28,6 @@ GNU General Public License for more details.
#define DT_STRING BIT( 7 ) // A null terminated string, sent as 8 byte chars
#define DT_SIGNED BIT( 8 ) // sign modificator
#undef offsetof
#define offsetof( s, m ) (size_t)&(((s *)0)->m)
#define NUM_FIELDS( x ) ((sizeof( x ) / sizeof( x[0] )) - 1)
// helper macroses