On 11/18/2017 01:25 PM, Jonas Gorski wrote: > The SHA256 implementation relied on WORDS_BIGENDIAN being defined for > big endian systems, but this was never done. This caused it to produce > wrong checksums on those systems. > > Fix this by replacing the check with a generic check for big endian byte > order. > > Fixes: 84552e64fa6d ("Adding sha256.[ch] Sorry forgot adding them. Thanks for > Graham Gower <graham.go...@gmail.com>")
Might be that the initial implementation was okay and that my autotools->cmake refactoring broke setting WORDS_BIGENDIAN. > Signed-off-by: Jonas Gorski <jonas.gor...@gmail.com> Acked-by: Jo-Philipp Wich <j...@mein.io> > --- > libopkg/sha256.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libopkg/sha256.c b/libopkg/sha256.c > index e0c4e3e0d423..5848799c0260 100644 > --- a/libopkg/sha256.c > +++ b/libopkg/sha256.c > @@ -30,7 +30,7 @@ > #include "unlocked-io.h" > #endif > > -#ifdef WORDS_BIGENDIAN > +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ > #define SWAP(n) (n) > #else > #define SWAP(n) \ > _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev