From 112c7d7c279a30da6e07452991343b88c8c25e28 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 15 Jun 2015 11:16:16 -0700 Subject: [PATCH] Issue #520: Define BCRYPT_SUCCESS for VS2008 --- libarchive/archive_cryptor_private.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libarchive/archive_cryptor_private.h b/libarchive/archive_cryptor_private.h index e1118ff80..b62ec0c66 100644 --- a/libarchive/archive_cryptor_private.h +++ b/libarchive/archive_cryptor_private.h @@ -48,6 +48,11 @@ typedef struct { #elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) #include +/* Common in other bcrypt implementations, but missing from VS2008. */ +#ifndef BCRYPT_SUCCESS +#define BCRYPT_SUCCESS(r) ((NTSTATUS)(r) == STATUS_SUCCESS) +#endif + #define AES_MAX_KEY_SIZE 32 #define AES_BLOCK_SIZE 16 typedef struct { -- 2.47.2