common.h: add inttypes.h and use PRIx64