>>216
struct hoge {
int a;
char b[1];
}

struct data *dp;

dp = malloc(sizeof(hoge) + datalen); <-可変長のデータ長を足して確保

汚いテクニックでしかも規格では未定義の動作とされているが
よく使われる