Fix compile error in C code