diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2022-03-11 11:23:47 -0500 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2022-03-11 11:23:47 -0500 |
commit | 20b23cc32edd4ad8aed1699b3b5d372efeac5c67 (patch) | |
tree | 4078122f69f3e062bf32bf648ef02ced0a51adee | |
parent | bea73492114c95149733405205483ce56d11125a (diff) | |
download | calcurse-20b23cc32edd4ad8aed1699b3b5d372efeac5c67.tar.gz calcurse-20b23cc32edd4ad8aed1699b3b5d372efeac5c67.zip |
Fix SHA1 calculation on big-endian systems
Add the AC_C_BIGENDIAN macro to determine endianness and set
WORDS_BIGENDIAN accordingly.
Fixes GitHub issue #397.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/sha1.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7405450..e7594c5 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,7 @@ AC_CANONICAL_HOST # Checks for programs #------------------------------------------------------------------------------- AC_PROG_CC +AC_C_BIGENDIAN #------------------------------------------------------------------------------- # Checks for header files #------------------------------------------------------------------------------- @@ -43,6 +43,7 @@ #include <stdlib.h> #include <string.h> +#include "config.h" #include "sha1.h" #define rol(val, n) (((val) << (n)) | ((val) >> (32 - (n)))) |