diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2026-02-19 16:13:57 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2026-02-19 16:25:26 +0000 |
| commit | dcbd1fccdc66ec33f0652be34a1c8bdd5293f90c (patch) | |
| tree | 37394c2db1d7dc498550770815ab6fa4b9a122c8 | |
| parent | 6010b73fa9574b8e651b08451f30ba9c05f3f894 (diff) | |
types.h: use central definition of offsetof()
Previously this broke if included after (sys/)stddef.h.
Reported by: des
Fixes: 2adc3f0db187 ("stddef.h: centralize definition of offsetof()")
| -rw-r--r-- | sys/sys/types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h index 8311c1901b7e..2d1035bda1e5 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -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) |
