#include #include #include uint64_t uint64_load_bigendian(const unsigned char *s) { uint64_t x; memcpy(&x,s,sizeof x); return be64toh(x); }