From 66717f2b43ab52b4b4944ae0b4e038c20590331b Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 21 Feb 2016 01:47:08 +0900 Subject: [PATCH] fix offsetof --- extlib/benz/include/picrin/setup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extlib/benz/include/picrin/setup.h b/extlib/benz/include/picrin/setup.h index 901daf1b..810fd338 100644 --- a/extlib/benz/include/picrin/setup.h +++ b/extlib/benz/include/picrin/setup.h @@ -104,7 +104,7 @@ #if __STDC_VERSION__ >= 199901L # include #elif ! defined(offsetof) -# define offsetof(s,m) ((size_t)&(((s *)NULL)->m)) +# define offsetof(s,m) ((size_t)(&(((s *)0)->m) - 0)) #endif #if __STDC_VERSION__ >= 199901L