mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 04:26:03 +08:00
Use built-in offsetof on Linux
This commit is contained in:
@ -360,7 +360,7 @@ typedef unsigned int uint;
|
||||
|
||||
#ifndef offsetof
|
||||
#ifdef GNUC
|
||||
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||
#define offsetof( type, var ) __builtin_offsetof( type, var )
|
||||
#else
|
||||
#include <stddef.h>
|
||||
#define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||
|
Reference in New Issue
Block a user