]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Define bcrypt macro not available in Win 7 SDK 876/head
authorBrad King <brad.king@kitware.com>
Fri, 24 Feb 2017 12:26:35 +0000 (07:26 -0500)
committerBrad King <brad.king@kitware.com>
Fri, 24 Feb 2017 12:33:32 +0000 (07:33 -0500)
VS 2010 comes with the Win 7 SDK and its bcrypt.h does not define the
`BCRYPT_HASH_REUSABLE_FLAG` macro.  Provide the definition locally if
it is not available.

libarchive/archive_hmac.c

index 1e0ae283bc94c2f6f146dcd6de5d1d5b38439d21..f29965577f0188bdf22b126a68c4bba1ac8dc9bb 100644 (file)
@@ -76,6 +76,10 @@ __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx)
 
 #elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
 
+#ifndef BCRYPT_HASH_REUSABLE_FLAG
+# define BCRYPT_HASH_REUSABLE_FLAG 0x00000020
+#endif
+
 static int
 __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len)
 {