[#10] Fix linux compilation.
This commit is contained in:
@@ -420,11 +420,10 @@ typedef enum _fieldtypes
|
||||
FIELD_TYPECOUNT, // MUST BE LAST
|
||||
} FIELDTYPE;
|
||||
|
||||
#ifndef linux
|
||||
#ifndef offsetof
|
||||
|
||||
#if !defined(offsetof) && !defined(GNUC)
|
||||
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _FIELD(type,name,fieldtype,count,flags) { fieldtype, #name, offsetof(type, name), count, flags }
|
||||
#define DEFINE_FIELD(type,name,fieldtype) _FIELD(type, name, fieldtype, 1, 0)
|
||||
|
||||
Reference in New Issue
Block a user