mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 08:41:15 +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
Notes:
sideshowbarker
2024-07-17 18:05:52 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/39f92fa131 Pull-request: https://github.com/SerenityOS/serenity/pull/12819
|
@ -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…
Reference in a new issue