Fixes build with musl-libc toolchains.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
#include <netinet/in.h> /* htonl() */
typedef struct {
#include <netinet/in.h> /* htonl() */
typedef struct {
- u_int32_t state[5];
- u_int32_t count[2];
+ uint32_t state[5];
+ uint32_t count[2];
unsigned char buffer[64];
} SHA1_CTX;
static void
unsigned char buffer[64];
} SHA1_CTX;
static void
-SHA1_Transform(u_int32_t[5], const unsigned char[64]);
+SHA1_Transform(uint32_t[5], const unsigned char[64]);
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
/* Hash a single 512-bit block. This is the core of the algorithm. */
static void
/* Hash a single 512-bit block. This is the core of the algorithm. */
static void
-SHA1_Transform(u_int32_t state[5], const unsigned char buffer[64])
+SHA1_Transform(uint32_t state[5], const unsigned char buffer[64])
- u_int32_t a, b, c, d, e;
+ uint32_t a, b, c, d, e;
typedef union {
unsigned char c[64];
typedef union {
unsigned char c[64];
} CHAR64LONG16;
CHAR64LONG16 *block;
} CHAR64LONG16;
CHAR64LONG16 *block;
static void
SHA1_Final(unsigned char digest[20], SHA1_CTX *context)
{
static void
SHA1_Final(unsigned char digest[20], SHA1_CTX *context)
{
unsigned char finalcount[8];
for (i = 0; i < 8; i++) {
unsigned char finalcount[8];
for (i = 0; i < 8; i++) {