c: Fix type mismatch in sequence number handling
c: Avoid void pointer to function pointer cast warnings with MSVC

Use construct suggested in Technical Corrigendum 1 of POSIX.1-2003.