1 #include <stdio.h>
2 
3 
4 #define stupid_offsetof_bullshit(type, member) \
5 	((size_t)&(((type *)0)->member))
6 
7 int
main()8 main() {
9 	struct barf {
10 		int	x;
11 		char	*p;
12 		struct nonsense {
13 			int x;
14 		} y;
15 		char	bogus[128][25];
16 		int	z;
17 	};
18 	static int	bla = stupid_offsetof_bullshit(struct barf, y);
19 	static int	bla2 = stupid_offsetof_bullshit(struct barf,
20 			bogus[3][2]);
21 	printf("%d\n", bla);
22 	printf("%d\n", bla2);
23 }
24 
25