From patchwork Mon Mar 9 12:24:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11427075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C21214B7 for ; Mon, 9 Mar 2020 12:44:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 019F920674 for ; Mon, 9 Mar 2020 12:44:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Yyd4G2PA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 019F920674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBHlQ-0000Rw-5Z for patchwork-qemu-devel@patchwork.kernel.org; Mon, 09 Mar 2020 08:44:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBHT8-0000hO-5G for qemu-devel@nongnu.org; Mon, 09 Mar 2020 08:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBHT2-00055d-9H for qemu-devel@nongnu.org; Mon, 09 Mar 2020 08:25:14 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:45238 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBHT2-000551-5g for qemu-devel@nongnu.org; Mon, 09 Mar 2020 08:25:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583756707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o80iYyi9PSaziGW4BFW5nB5KIni89LhgcEseD8RIrKM=; b=Yyd4G2PA5UjphzRt4KHXG3lLOgmCSv492CQEY+Gfehrs47uqEF9QmDuhAUREojJGoJDl8S Cn1wkiMsA6ZAeYz2DKgDLUvgki61+GxxX2kR88GV7dVAhQCu2MLDqwNA3FBH+tnwyv035v nbZFg6UqtdpJ4pKstnyEF3ZMHwU4168= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-63-esniyDiJOwaNea6WWoYsRw-1; Mon, 09 Mar 2020 08:25:05 -0400 X-MC-Unique: esniyDiJOwaNea6WWoYsRw-1 Received: by mail-wr1-f69.google.com with SMTP id c6so5099874wrm.18 for ; Mon, 09 Mar 2020 05:25:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PTSezPJVmrlbvaU6EOImy8yB1mRHDHMGvBW/t0vnzrg=; b=lsm0WF0szUyu8neQf2+/xJdeb2imSNSIDW2YOEE5XK3K/7EKLeOOKEsBBaZGrTQsD3 3NX7w9FNcAQx2vIddsopPOoSAfqh6m1LgNEKi1pBi7sRCjKWBG5tBSe5YGTet8USixZT 98p6HTF2qarLz2Q5Mrc02a727hPyi6qy7LjJMFte3SW7IqoZ1vXgxCHdCODYY9IEhLt/ bkAeU9RIR7TYsD9XYEKuw43k6azq54vJgh8K5Gt2/bD0qqSx2j2JW/T81NFobQSRJU/x 5nw/+43WM919h8d07mCRQjM30x/8FCTVdieGdRWytxzOwJz4gWoygMjiepRs0/dg35Vy LJSg== X-Gm-Message-State: ANhLgQ3p2X5K64xBnkz07AV4btshvqA6ieI48d19qkh9+wXK5KRpZMOi /PVAQXJvmXjWLzjBuLUGqkCKKKraSCbD7UbZOZq4Xobi3oiY+7FPQZY9eW9R07zs1KWuYM9x0zD jYd1aM8ENRI496rg= X-Received: by 2002:a05:600c:20c7:: with SMTP id y7mr20420963wmm.77.1583756704231; Mon, 09 Mar 2020 05:25:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtWVzwuZjkDbgyyogzPL7VfBMhyabtKKq7i9IwHwdE8X5tycTeGSzqyOca3shGRFUdLc8lfVQ== X-Received: by 2002:a05:600c:20c7:: with SMTP id y7mr20420933wmm.77.1583756703970; Mon, 09 Mar 2020 05:25:03 -0700 (PDT) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id c5sm9826379wma.3.2020.03.09.05.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 05:25:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 1/2] configure: Fix building with SASL on Windows Date: Mon, 9 Mar 2020 13:24:53 +0100 Message-Id: <20200309122454.22551-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200309122454.22551-1-philmd@redhat.com> References: <20200309122454.22551-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Alexey Pavlov , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , =?utf-8?b?0JA=?= =?utf-8?b?0LvQtdC60YHQtdC5INCf0LDQstC70L7Qsg==?= , =?utf-8?b?0JzQtdGC0LvQuNGG0LrQuNC5INCu0YDQuNC5INCS0LjQutGC0L7RgNC+0LLQuNGH?= , Biswapriyo Nath , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Youry Metlitsky Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Simple Authentication and Security Layer (SASL) library re-defines the struct iovec on Win32 [*]. QEMU also re-defines it in "qemu/osdep.h". The two definitions then clash on a MinGW build. We can avoid the SASL definition by defining STRUCT_IOVEC_DEFINED. Since QEMU already defines 'struct iovec' if it is missing, add the definition to vnc_sasl_cflags to avoid SASL re-defining it. [*] https://github.com/cyrusimap/cyrus-sasl/blob/cyrus-sasl-2.1.27/include/sasl.h#L187 Cc: Alexey Pavlov Cc: Biswapriyo Nath Reported-by: Youry Metlitsky Signed-off-by: Philippe Mathieu-Daudé --- v2: Since QEMU provides 'struct iovec' if missing, always define STRUCT_IOVEC_DEFINED (danpb review). --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index cbf864bff1..a4cd4bccfb 100755 --- a/configure +++ b/configure @@ -3349,7 +3349,9 @@ if test "$vnc" = "yes" && test "$vnc_sasl" != "no" ; then int main(void) { sasl_server_init(NULL, "qemu"); return 0; } EOF # Assuming Cyrus-SASL installed in /usr prefix - vnc_sasl_cflags="" + # QEMU defines struct iovec in "qemu/osdep.h", + # we don't want libsasl to redefine it in . + vnc_sasl_cflags="-DSTRUCT_IOVEC_DEFINED" vnc_sasl_libs="-lsasl2" if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then vnc_sasl=yes