mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-18 20:37:56 +00:00
build compat fix for mac os: define offsetof if it's missing
When building on Mac OS, we don't seem to have offsetof when we need it for gperf-generated code. This patch solves that issue. Signed-off-by: Lawrence D'Anna <larry@elder-gods.org>
This commit is contained in:
parent
18175b8d93
commit
575d56ee68
@ -7,6 +7,15 @@
|
||||
%pic
|
||||
%struct-type
|
||||
|
||||
%{
|
||||
# ifndef offsetof
|
||||
# include <stddef.h>
|
||||
# ifndef offsetof
|
||||
# define offsetof(st, m) ((size_t)(&((st *)0)->m))
|
||||
# endif
|
||||
# endif
|
||||
%}
|
||||
|
||||
struct kconf_id;
|
||||
|
||||
static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
|
||||
|
Loading…
Reference in New Issue
Block a user