]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on Illumos.
authorRoy Marples <roy@marples.name>
Thu, 5 Oct 2017 13:53:11 +0000 (14:53 +0100)
committerRoy Marples <roy@marples.name>
Thu, 5 Oct 2017 13:53:11 +0000 (14:53 +0100)
compat/crypt/hmac.c

index 52f38544a8ee9cdc24eb8c62ef38e344ebae8d6a..55e331ffa02172408e0fc880f76568cc7d75abd1 100644 (file)
 
 #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
 #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