From: Roy Marples Date: Thu, 5 Oct 2017 13:53:11 +0000 (+0100) Subject: Fix compile on Illumos. X-Git-Tag: v7.0.0-rc3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b77fc6eee4ca275dbd27c50dbaa85786abae8b96;p=thirdparty%2Fdhcpcd.git Fix compile on Illumos. --- diff --git a/compat/crypt/hmac.c b/compat/crypt/hmac.c index 52f38544..55e331ff 100644 --- a/compat/crypt/hmac.c +++ b/compat/crypt/hmac.c @@ -34,10 +34,8 @@ #include "config.h" -#ifdef HAVE_MD5_H -# ifndef DEPGEN -# include -# endif +#if defined(HAVE_MD5_H) && !defined(DEPGEN) +#include #endif #ifdef SHA2_H @@ -45,7 +43,7 @@ #endif #ifndef __arraycount -# define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) +#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) #endif #if 0 @@ -57,6 +55,13 @@ #include #endif +#ifndef MD5_BLOCK_LENGTH +#define MD5_BLOCK_LENGTH 64 +#endif +#ifndef SHA256_BLOCK_LENGTH +#define SHA256_BLOCK_LENGTH 64 +#endif + #define HMAC_SIZE 128 #define HMAC_IPAD 0x36 #define HMAC_OPAD 0x5C