Use __typeof__ instead of typeof

Thiago Macieira compiles with -std=c++11.
This commit is contained in:
Kristian Høgsberg 2011-12-22 15:23:54 -05:00
parent aad1e19058
commit 5e078bfa5a

View file

@ -40,8 +40,8 @@ extern "C" {
#define ALIGN(n, a) ( ((n) + ((a) - 1)) & ~((a) - 1) )
#define DIV_ROUNDUP(n, a) ( ((n) + ((a) - 1)) / (a) )
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
#define container_of(ptr, type, member) ({ \
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
struct wl_message {