Fix 32bit ecid

This commit is contained in:
Cryptiiiic 2021-06-02 02:45:27 -07:00
parent 568146080a
commit 258d9b0ea9
No known key found for this signature in database
GPG key ID: 4CCAE32CC026C76D

View file

@ -31,6 +31,12 @@ extern "C"{
#include "restore.h"
#include "tsschecker.h"
#include <libirecovery.h>
#if defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define __bswap_64(x) OSSwapInt64(x)
#else
#include <byteswap.h>
#endif
}
//(re)define __mkdir
@ -1543,7 +1549,7 @@ uint64_t futurerestore::getEcidFromSCAB(const char* scab, size_t scabSize){
ret <<=8;
ret |= ((uint8_t*)elem.payload())[i];
}
return ret;
return __bswap_64(ret);
}
}