libopkg: fix SHA256 calculation for big endian system
authorJonas Gorski <jonas.gorski@gmail.com>
Sat, 18 Nov 2017 11:30:11 +0000 (12:30 +0100)
committerJonas Gorski <jonas.gorski@gmail.com>
Mon, 4 Dec 2017 14:01:01 +0000 (15:01 +0100)
commit468158f01ea0cb891f586936217f1a765fd207b7
tree0ca2857630d0ada28a0c8c1963be8b52b5a17e8b
parent4bd8601ebd95c130e504cc724b0c5eb163050982
libopkg: fix SHA256 calculation for big endian system

The SHA256 implementation relied on WORDS_BIGENDIAN being defined for
big endian systems, but this was broken since the switch to cmake,
causing wrong checksums on big endian systems like ar71xx.

Fix this by adding a cmake check for endianess similar to the one done
by the original autotools.

Fixes: e6e6c5a21634 ("build: add cmake build system")
Acked-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
CMakeLists.txt