From patchwork Mon Jun 16 15:02:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Bruno X-Patchwork-Id: 360159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E7203140080 for ; Tue, 17 Jun 2014 01:03:03 +1000 (EST) Received: from localhost ([::1]:44592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYQh-0007So-MC for incoming@patchwork.ozlabs.org; Mon, 16 Jun 2014 11:02:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYQL-0007BM-R6 for qemu-devel@nongnu.org; Mon, 16 Jun 2014 11:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwYQE-0004ni-CH for qemu-devel@nongnu.org; Mon, 16 Jun 2014 11:02:17 -0400 Received: from ignoranthack.me ([199.102.79.106]:64490 helo=mail.ignoranthack.me) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYQE-0004ne-7h for qemu-devel@nongnu.org; Mon, 16 Jun 2014 11:02:10 -0400 Received: from alice.hsd1.ca.comcast.net. (c-50-131-5-126.hsd1.ca.comcast.net [50.131.5.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 19A311936DE; Mon, 16 Jun 2014 15:02:09 +0000 (UTC) From: Sean Bruno To: qemu-devel@nongnu.org Date: Mon, 16 Jun 2014 08:02:07 -0700 Message-Id: <1402930927-41125-1-git-send-email-sbruno@freebsd.org> X-Mailer: git-send-email 1.9.3 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 199.102.79.106 Cc: Sean Bruno Subject: [Qemu-devel] [PATCH v3] bsd-user: Add patches to fix AES_* link errors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Ed Maste --- 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,