Variable declarations have to happen at the top of the scope (C89). Also this should use `alias->alias_len`. Also I think you forgot to alloc/copy the NUL terminator.

Maybe just write `fn_copy.common.function_name = estrndup(alias->alias, alias->alias_len)` instead?

Apart from that, can't say whether patch is right or not. Don't know traits well enough.