changeset 4154:3fa6421d2b43 draft

Fix compile on Illumos.
author Roy Marples <roy@marples.name>
date Thu, 05 Oct 2017 14:53:11 +0100
parents 4316efdaceae
children ce2dc42f0788
files compat/crypt/hmac.c
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/compat/crypt/hmac.c	Thu Oct 05 14:34:05 2017 +0100
+++ b/compat/crypt/hmac.c	Thu Oct 05 14:53:11 2017 +0100
@@ -34,10 +34,8 @@
 
 #include "config.h"
 
-#ifdef HAVE_MD5_H
-#  ifndef DEPGEN
-#    include <md5.h>
-#  endif
+#if defined(HAVE_MD5_H) && !defined(DEPGEN)
+#include <md5.h>
 #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 <sha2.h>
 #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