diff --git a/lib/srutils/sha256.c b/lib/srutils/sha256.c index 087736d84a6..5e87bebdf8f 100644 --- a/lib/srutils/sha256.c +++ b/lib/srutils/sha256.c @@ -36,6 +36,12 @@ #include /* assert() */ #include "sha256.h" +/* discover byte order on solaris */ +#if defined(__SVR4) || defined(__sun) + #include + #define BYTE_ORDER _BYTE_ORDER +#endif + /* * ASSERT NOTE: * Some sanity checking code is included using assert(). On my FreeBSD diff --git a/lib/srutils/sha256.h b/lib/srutils/sha256.h index 78393e5666a..4c134d25bdd 100644 --- a/lib/srutils/sha256.h +++ b/lib/srutils/sha256.h @@ -53,6 +53,12 @@ extern "C" { #endif /* SHA2_USE_INTTYPES_H */ +/* fix types for Sun Solaris */ +#if defined(__SVR4) || defined(__sun) + typedef uint8_t u_int8_t; + typedef uint32_t u_int32_t; + typedef uint64_t u_int64_t; +#endif /*** SHA-256/384/512 Various Length Definitions ***********************/ #define SHA256_BLOCK_LENGTH 64