mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-01-07 09:43:40 +08:00
Use built-in offsetof on Linux
This commit is contained in:
parent
dc3346780d
commit
6395b1c704
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user