From nobody Sun Feb 8 13:32:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.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=1594893727; cv=none; d=zohomail.com; s=zohoarc; b=fK1n1BpdP/Ms54efcRgSerGhyJgeYljQqcX9z6XVL+ZR0mJJNl8PxwwNlqnbwRWHzXNna1FnrzCNRJPy3qhSVIcWsfrSbgkk6lMNvt2EGctiyq7WlsdN83hvrQiQB+6aDzyoQr474etDsG8pgVVphUZ572IRMgqLIa7oXBvU1Yw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893727; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IS289babXgsxisPQacK6kxHf5mhhvmDS05ZwKN2F6Fs=; b=W80Ffr0oJeR1wHxcLIxebCtiotTu4HLI3w744uO7pWd5kKehy6k72ldFsDc4ns/i3GgmPDPcAAJoquE0MCcKzIMqVGvVeab3S9JJceeMPsjzNNBL4fB7pjqskohcBApkymCvuo2XSPMajUXf5jwZzS7VnaGkj9OqiRzN73+DpT4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594893727250637.0896075827394; Thu, 16 Jul 2020 03:02:07 -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-105-jepYv8f6PMuscotlNExRXA-1; Thu, 16 Jul 2020 06:01:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0551B10059C4; Thu, 16 Jul 2020 10:00:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D551361983; Thu, 16 Jul 2020 10:00:53 +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 A4B2D96240; Thu, 16 Jul 2020 10:00:53 +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 06GA0kxx015472 for ; Thu, 16 Jul 2020 06:00:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id DADF82DE71; Thu, 16 Jul 2020 10:00:46 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 538522DE6F for ; Thu, 16 Jul 2020 10:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893726; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IS289babXgsxisPQacK6kxHf5mhhvmDS05ZwKN2F6Fs=; b=PoJ4BbfMDn9/fc0kdYFvBa+DEGXh44Qq5CHTpneySNJfztCCAxruzggHMnX0fDBsX1HY5H 3YeCytj7l0n7E82ML8tr83GBEh7kW3iP8R6Ym15/A5X08gjAxVWAqTAKgHNOJd+RlVcoGq Cn97FISFJ5kxN8KZyx2lMekiOHF+sjU= X-MC-Unique: jepYv8f6PMuscotlNExRXA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 025/351] meson: add functions check Date: Thu, 16 Jul 2020 11:54:21 +0200 Message-Id: In-Reply-To: References: 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.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- configure.ac | 33 --------------------------------- meson.build | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/configure.ac b/configure.ac index 07b86d8b944..904c2a0fdcf 100644 --- a/configure.ac +++ b/configure.ac @@ -207,38 +207,6 @@ LIBVIRT_CHECK_YAJL =20 AC_CHECK_SIZEOF([long]) =20 -dnl Availability of various common functions (non-fatal if missing), -dnl and various less common threadsafe functions -AC_CHECK_FUNCS_ONCE([\ - elf_aux_info \ - fallocate \ - getauxval \ - getegid \ - geteuid \ - getgid \ - getifaddrs \ - getmntent_r \ - getpwuid_r \ - getrlimit \ - getuid \ - getutxid \ - if_indextoname \ - mmap \ - newlocale \ - posix_fallocate \ - posix_memalign \ - pipe2 \ - prlimit \ - sched_getaffinity \ - sched_setscheduler \ - setgroups \ - setns \ - setrlimit \ - symlink \ - sysctlbyname \ - unshare \ - ]) - dnl Availability of various common headers (non-fatal if missing). AC_CHECK_HEADERS([\ asm/hwcap.h \ @@ -263,7 +231,6 @@ AC_CHECK_HEADERS([\ ]) dnl Check whether endian provides handy macros. AC_CHECK_DECLS([htole64], [], [], [[#include ]]) -AC_CHECK_FUNCS([stat stat64 __xstat __xstat64 lstat lstat64 __lxstat __lxs= tat64]) =20 AC_CHECK_TYPE([struct ifreq], [AC_DEFINE([HAVE_STRUCT_IFREQ],[1], diff --git a/meson.build b/meson.build index b5430012a79..eb71a66cdf2 100644 --- a/meson.build +++ b/meson.build @@ -617,6 +617,53 @@ libvirt_export_dynamic =3D cc.first_supported_link_arg= ument([ ]) =20 =20 +# check availability of various common functions (non-fatal i missing) + +functions =3D [ + '__lxstat', + '__lxstat64', + '__xstat', + '__xstat64', + 'elf_aux_info', + 'fallocate', + 'getauxval', + 'getegid', + 'geteuid', + 'getgid', + 'getifaddrs', + 'getmntent_r', + 'getpwuid_r', + 'getrlimit', + 'getuid', + 'getutxid', + 'if_indextoname', + 'lstat', + 'lstat64', + 'mmap', + 'newlocale', + 'pipe2', + 'posix_fallocate', + 'posix_memalign', + 'prlimit', + 'sched_getaffinity', + 'sched_setscheduler', + 'setgroups', + 'setns', + 'setrlimit', + 'stat', + 'stat64', + 'symlink', + 'sysctlbyname', + 'unshare', +] + +foreach function : functions + if cc.has_function(function) + conf.set('HAVE_@0@'.format(function.to_upper()), 1) + endif +endforeach + + # define top include directory =20 top_inc_dir =3D include_directories('.') --=20 2.26.2