1
0
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:
Nick Hastings 2023-11-19 09:02:42 -05:00
parent dc3346780d
commit 6395b1c704

View File

@ -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)