]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue #520: Define BCRYPT_SUCCESS for VS2008
authorTim Kientzle <kientzle@acm.org>
Mon, 15 Jun 2015 18:16:16 +0000 (11:16 -0700)
committerTim Kientzle <kientzle@acm.org>
Mon, 15 Jun 2015 18:16:16 +0000 (11:16 -0700)
libarchive/archive_cryptor_private.h

index e1118ff8064e6aad43ca4aa148c880b91f976a6a..b62ec0c666221581901d58f0784cf49753e3c0f5 100644 (file)
@@ -48,6 +48,11 @@ typedef struct {
 #elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
 #include <Bcrypt.h>
 
+/* 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 {