You should forward declare your struct
typedef struct struct1 struct1;
typedef struct struct2 struct2;
struct struct2 {
struct1* someStruct1Var;
//Other variables
};
struct struct1 {
//Some variables
struct2* (*someFunc)(struct2* someStruct2Var);
}
Doing it with a typedef
help to omit the struct
keyword to name the type.