apply jckarter's patch for fixing x86-64 ABI
fix clang's warning about implicit NULL convertion