From nobody Sun Apr 28 23:45:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599048506; cv=none; d=zohomail.com; s=zohoarc; b=aaI514vPiLe1DcE6WyrkxRLFDzFfwkwPb8IkUUVQ38nisL6qfUOGBqrQQfkq8I03GirtoSLa9uCo34c6rExZltBOG6YyckvFpNjaKGHv72a2bTzKL/XrIa2q2tYOuLy864XcvL0dn2BXsNexe9qQo6VpJxpLzpaAu0avnXl12eQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599048506; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=bjEOMimPlhmOoG/3bMhGsygx9KeIpUUTh6YmBdJ11Cc=; b=AuDqaOIs6FcBtUXYpfHmqAfNTrfsvQicUsrDacZXNHwiY1GDwzsMPJBaYVPHdPzNEBpCVOlVoy6062v0YtgV0chBo30ibJHnKsXlsUsVxzo563c2tNTviWgTM7UOUt3pdezdmEiQ2D4aaUByPQ/0U1ezAYe0d7UD0wffaygmw4w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1599048506959177.76264496242095; Wed, 2 Sep 2020 05:08:26 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-274-60wJlrIvMbeXw5fYswcE6Q-1; Wed, 02 Sep 2020 08:08:21 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10F081DDFF; Wed, 2 Sep 2020 12:08:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 687021002D6C; Wed, 2 Sep 2020 12:08:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F3F88183D020; Wed, 2 Sep 2020 12:08:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 082C8ACA032443 for ; Wed, 2 Sep 2020 08:08:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id D01601974D; Wed, 2 Sep 2020 12:08:10 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 51664196F3 for ; Wed, 2 Sep 2020 12:08:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599048504; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bjEOMimPlhmOoG/3bMhGsygx9KeIpUUTh6YmBdJ11Cc=; b=LTvpq/yPXRt8q2EtL+frIO/dlNZQPsZYbS+yeWZbmGXvZFPMii3yQAQ1eQCb1ZeoRUQHKz 5BXkgL3kvz9WMllLx+7DkNyWdAa4OndHULckeY5rrtZtQ74qiyeLeAL8pMm5OeOL2W2Lwp FsjQESZpTp9Cg3slHy48E11ct5ArMcA= X-MC-Unique: 60wJlrIvMbeXw5fYswcE6Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] meson: Check for stdarg.h Date: Wed, 2 Sep 2020 14:07:54 +0200 Message-Id: <94293ff3925b707cad3225a54529db7b843b43c1.1599048474.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" As it turns out, one of my previous commits in which I removed checking for stdarg.h was too aggressive. Long story short, the readline public headers rely on stdarg.h and what is worse, they expect us to declare the autotools style of macro (HAVE_STDARG_H) if the header file exists. If we don't do it then compiling virsh on macos fails. See 9ea3424a178 for more info. Fixes: 85808b73846f93d656b4c81b6ebddd2dc3881bf6 Signed-off-by: Michal Privoznik --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 1aad385ad1..98f7545495 100644 --- a/meson.build +++ b/meson.build @@ -1333,8 +1333,12 @@ if readline_dep.found() endif endif =20 - # We need this to avoid compilation issues with modern compilers. - # See 9ea3424a178 for a more detailed explanation + # We need both of these hacks to avoid compilation issues with modern + # compilers. See 9ea3424a178 for a more detailed explanation. + if cc.has_header('stdarg.h') + conf.set('HAVE_STDARG_H', 1) + endif + readline_dep =3D declare_dependency( compile_args: [ '-D_FUNCTION_DEF' ], dependencies: [ readline_dep ], --=20 2.26.2