qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3] bsd-user: Add patches to fix AES_* link errors


From: Sean Bruno
Subject: [Qemu-devel] [PATCH v3] bsd-user: Add patches to fix AES_* link errors
Date: Mon, 16 Jun 2014 08:02:07 -0700

v3
 Drop patch1 as it has been superceeded
 Drop patch3 as it doesn't belong in this patchset

v2
 Correct email address for Ed Maste

Redefine functions as QEMU_AES_* to avoid conflicts with AES_* in
-lcrypto needed (at least) by -lcurl.

Take from emulators/qemu-devel/files/patch-include-qemu-aes.h

Signed-off-by: Sean Bruno <address@hidden>
Signed-off-by: Ed Maste <address@hidden>
---
 include/qemu/aes.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/qemu/aes.h b/include/qemu/aes.h
index e79c707..d310411 100644
--- a/include/qemu/aes.h
+++ b/include/qemu/aes.h
@@ -10,6 +10,15 @@ struct aes_key_st {
 };
 typedef struct aes_key_st AES_KEY;
 
+/* FreeBSD has it's own AES_set_decrypt_key in -lcrypto, avoid conflicts */
+#ifdef __FreeBSD__
+#define AES_set_encrypt_key QEMU_AES_set_encrypt_key
+#define AES_set_decrypt_key QEMU_AES_set_decrypt_key
+#define AES_encrypt QEMU_AES_encrypt
+#define AES_decrypt QEMU_AES_decrypt
+#define AES_cbc_encrypt QEMU_AES_cbc_encrypt
+#endif
+
 int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
        AES_KEY *key);
 int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
-- 
1.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]