I'm missing a
typedef
in your code:
struct A
{
int Z;
};
typedef struct A myStruct;
typedef void (*callback_fn_ptr)(myStruct *ptr);
callback_fn_ptr my_fun_ptr;
However, you may also use a
typedef
'ed struct instead:
typedef struct
{
int Z;
} myStruct;
typedef void (*callback_fn_ptr)(myStruct *ptr);
callback_fn_ptr my_fun_ptr;
Both above snippets compile with GCC.