diff options
Diffstat (limited to 'ccan/container_of')
-rw-r--r-- | ccan/container_of/container_of.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ccan/container_of/container_of.h b/ccan/container_of/container_of.h index b30c347d57..872bb6ea6e 100644 --- a/ccan/container_of/container_of.h +++ b/ccan/container_of/container_of.h @@ -112,7 +112,7 @@ static inline char *container_of_or_null_(void *member_ptr, size_t offset) * return i; * } */ -#if HAVE_TYPEOF +#if defined(HAVE_TYPEOF) && HAVE_TYPEOF #define ccan_container_of_var(member_ptr, container_var, member) \ ccan_container_of(member_ptr, typeof(*container_var), member) #else @@ -131,7 +131,7 @@ static inline char *container_of_or_null_(void *member_ptr, size_t offset) * structure memory layout. * */ -#if HAVE_TYPEOF +#if defined(HAVE_TYPEOF) && HAVE_TYPEOF #define ccan_container_off_var(var, member) \ ccan_container_off(typeof(*var), member) #else |