chriscz added a comment.
This stack overflow answer <https://stackoverflow.com/a/27054190> has a more exhaustive approach to determining endianness. It may be worth extracting this code into a more appropriate header file though. Also here's the issue on the bugzilla tracker <https://bugs.kde.org/show_bug.cgi?id=421856> REPOSITORY R311 KWallet REVISION DETAIL https://phabricator.kde.org/D29832 To: chriscz, dfaure Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns