diff options
| author | Aetias <aetias@outlook.com> | 2025-03-08 11:46:11 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-03-08 11:46:11 +0100 |
| commit | 35d8fa6f103a93dad0de6b7adb5181d6882db3f9 (patch) | |
| tree | 1abc5e65c73536b459ba13c1457b3808480b86af /libs | |
| parent | 656ec5779cccb3f8e2146299ab9af1d4bb95d7c4 (diff) | |
Add `offsetof` macro
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/c/include/stddef.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/c/include/stddef.h b/libs/c/include/stddef.h index 4986043a..b0c76af3 100644 --- a/libs/c/include/stddef.h +++ b/libs/c/include/stddef.h @@ -5,4 +5,6 @@ typedef unsigned int size_t; +#define offsetof(type, member) (size_t) &((type *) NULL)->member + #endif |
