You have mistaken the position of keyword `struct` or `union` with the position of `__packed` or `__attribute__((packed))`. Even with `typedef`, you should still write like `typedef struct __packed`.
You have mistaken the position of keyword `struct` or `union` with the position of `__packed` or `__attribute__((packed))`. Even with `typedef`, you should still write like `typedef struct __packed`.