mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 06:14:58 +00:00
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:
parent
fcb64311dc
commit
39f92fa131
2 changed files with 2 additions and 2 deletions
|
@ -6,6 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define offsetof(type, member) __builtin_offsetof(type, member)
|
||||
|
||||
#ifndef KERNEL
|
||||
|
||||
# include <sys/cdefs.h>
|
||||
|
|
|
@ -22,5 +22,3 @@
|
|||
|
||||
#undef __P
|
||||
#define __P(a) a
|
||||
|
||||
#define offsetof(type, member) __builtin_offsetof(type, member)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue