diff --git a/source/views/view_hashes.cpp b/source/views/view_hashes.cpp index a7134d595..da1000731 100644 --- a/source/views/view_hashes.cpp +++ b/source/views/view_hashes.cpp @@ -6,6 +6,12 @@ #include +#ifdef __MINGW32__ +#include +#else +#include +#endif + namespace hex { ViewHashes::ViewHashes(prv::Provider* &dataProvider) : View(), m_dataProvider(dataProvider) { @@ -21,7 +27,7 @@ namespace hex { static void formatBigHexInt(auto dataArray, char *buffer, size_t bufferSize) { for (int i = 0; i < dataArray.size(); i++) - snprintf(buffer + 8 * i, bufferSize - 8 * i, "%08X", __builtin_bswap32(dataArray[i])); + snprintf(buffer + 8 * i, bufferSize - 8 * i, "%08X", htonl(dataArray[i])); } void ViewHashes::createView() {