qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] bsd-user: Add patches to fix AES_* link errors
@ 2014-06-16 15:02 Sean Bruno
  2014-06-17 16:48 ` Sean Bruno
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Bruno @ 2014-06-16 15:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: Sean Bruno

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 <sbruno@freebsd.org>
Signed-off-by: Ed Maste <emaste@freebsd.org>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-19 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 15:02 [Qemu-devel] [PATCH v3] bsd-user: Add patches to fix AES_* link errors Sean Bruno
2014-06-17 16:48 ` Sean Bruno
2014-06-19 13:40   ` Sean Bruno
2014-06-19 15:17     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).