types.h: use central definition of offsetof()

Previously this broke if included after (sys/)stddef.h.

Reported by:	des
Fixes:		2adc3f0db1 ("stddef.h: centralize definition of offsetof()")
This commit is contained in:
Brooks Davis
2026-02-19 16:13:57 +00:00
parent 6010b73fa9
commit dcbd1fccdc
+1 -1
View File
@@ -42,6 +42,7 @@
/* Machine type dependent parameters. */
#include <machine/endian.h>
#include <sys/_types.h>
#include <sys/_offsetof.h>
#include <sys/_pthreadtypes.h>
@@ -291,7 +292,6 @@ typedef __uint64_t uoff_t;
typedef char vm_memattr_t; /* memory attribute codes */
typedef struct vm_page *vm_page_t;
#define offsetof(type, field) __offsetof(type, field)
#endif /* _KERNEL */
#if defined(_KERNEL) || defined(_STANDALONE)