From: Brad King Date: Fri, 24 Feb 2017 12:26:35 +0000 (-0500) Subject: Define bcrypt macro not available in Win 7 SDK X-Git-Tag: v3.3.1~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb29029333651b788131bcc34178c13dbf136ec4;p=thirdparty%2Flibarchive.git Define bcrypt macro not available in Win 7 SDK 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. --- diff --git a/libarchive/archive_hmac.c b/libarchive/archive_hmac.c index 1e0ae283b..f29965577 100644 --- a/libarchive/archive_hmac.c +++ b/libarchive/archive_hmac.c @@ -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) {