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