fixing compiling c code