diff --git a/ref_soft/r_local.h b/ref_soft/r_local.h index 36d34580..99cb2635 100644 --- a/ref_soft/r_local.h +++ b/ref_soft/r_local.h @@ -35,7 +35,10 @@ typedef struct mip_s mip_t; typedef int fixed8_t; typedef int fixed16_t; + +#ifndef offsetof #define offsetof(s,m) (size_t)&(((s *)0)->m) +#endif // offsetof #define ASSERT(x) if(!( x )) gEngfuncs.Host_Error( "assert failed at %s:%i\n", __FILE__, __LINE__ ) #define Assert(x) if(!( x )) gEngfuncs.Host_Error( "assert failed at %s:%i\n", __FILE__, __LINE__ )