X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=cmd%2Fzstd%2Fenzstd.c;h=6dbbe985a6367080b0384a4a89151e512210d78e;hb=77f88857fb809ba6ffa92029255f69c20572e6d2;hp=63e557414cd20327dcf83e0d41771e024216770f;hpb=4e53eb0ef0947956deabbcf03b4d0dced9703a15;p=tofuproxy.git diff --git a/cmd/zstd/enzstd.c b/cmd/zstd/enzstd.c index 63e5574..6dbbe98 100644 --- a/cmd/zstd/enzstd.c +++ b/cmd/zstd/enzstd.c @@ -18,7 +18,6 @@ along with this program. If not, see . #include #include #include -#include #include @@ -70,7 +69,10 @@ main(int argc, char **argv) perror("can not fread(stdin)"); goto Exit; } - srcWantSize = (size_t)be64dec(src); + srcWantSize = ((uint64_t)(src[0]) << 56) | ((uint64_t)(src[1]) << 48) | + ((uint64_t)(src[2]) << 40) | ((uint64_t)(src[3]) << 32) | + ((uint64_t)(src[4]) << 24) | ((uint64_t)(src[5]) << 16) | + ((uint64_t)(src[6]) << 8) | (uint64_t)(src[7]); if (srcWantSize > srcSize) { free(src); srcSize = srcWantSize;