LibC: Define offsetof in stddef.h instead of sys/cdefs.h

Just like Dr. POSIX ordered. Move the macro where it belongs, but make
sure it's visible to Userland files compiled with -DKERNEL. Parts of
LibEDID that are compiled into the Kernel use offsetof to parse the
EDID information given to us by hardware.
This commit is contained in:
Andrew Kaster 2022-02-28 18:52:04 -07:00 committed by Brian Gianforcaro
parent fcb64311dc
commit 39f92fa131
Notes: sideshowbarker 2024-07-17 18:05:52 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -6,6 +6,8 @@
#pragma once
#define offsetof(type, member) __builtin_offsetof(type, member)
#ifndef KERNEL
# include <sys/cdefs.h>

View file

@ -22,5 +22,3 @@
#undef __P
#define __P(a) a
#define offsetof(type, member) __builtin_offsetof(type, member)