summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-04-25 20:28:41 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-04-25 20:28:41 (GMT)
commitf1158a215b6756f679a8646c66126cf0ef944366 (patch)
treea39cda1e94c0b426cef49f256dd6860c33d02da1
parent822fc8b141dad767ef9ec5a6bfec2682deaa8d0a (diff)
parent575d56ee680e19a4bd235f549a5a047b517adce0 (diff)
Merge pull request #65 from smoofra/gperf
build compat fix for mac os: define offsetof if it's missing
-rw-r--r--kconfig/zconf.gperf9
1 files changed, 9 insertions, 0 deletions
diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
index c9e690e..d758a2a 100644
--- a/kconfig/zconf.gperf
+++ b/kconfig/zconf.gperf
@@ -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);