Commit 1bbef4be authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Avoid usage of typeof and replace __builtin_offsetof with offsetof

parent 918f8cca
......@@ -40,11 +40,8 @@
#define lstreq(A, B, N) ((sizeof((A)) - 1) == (N) && memcmp((A), (B), (N)) == 0)
#define nghttp2_struct_of(ptr, type, member) \
({ \
const typeof(((type *)0)->member) *nghttp2__mptr = (ptr); \
(type *)(void *)((char *)nghttp2__mptr - __builtin_offsetof(type, member)); \
})
#define nghttp2_struct_of(ptr, type, member) \
((type *)(void *)((char *)(ptr) - offsetof(type, member)))
/*
* Copies 2 byte unsigned integer |n| in host byte order to |buf| in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment