diff --git a/qdl.h b/qdl.h index 93203b9..4d35ef0 100644 --- a/qdl.h +++ b/qdl.h @@ -11,7 +11,7 @@ #define container_of(ptr, typecast, member) ({ \ void *_ptr = (void *)(ptr); \ - ((typecast *)(_ptr - offsetof(typecast, member))); }) + ((typeof(typecast) *)(_ptr - offsetof(typecast, member))); }) #define MAPPING_SZ 64