fix all old prototypes and build with clang