From nobody Wed Apr 24 08:24:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565941477; cv=none; d=zoho.com; s=zohoarc; b=TrSsLDDP0kfWnX3sJJovzfr9jnUhRK+juw864+psO1zCQmnQxSfnmcDyyW89FuS8B01s+jvdJAiiFM9xAvD5LhGlfKwDQ6O01xZDG5BIzHj96WmmJMU9xNFJB/znMUW+zsmWoRv8x9YbcrUKKOb7IdiuIYBXZqhwr+RyAGImsc4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565941477; 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:ARC-Authentication-Results; bh=S/UxhqazExoOtOPqAHrsJBWhmbLtV4WwyPxagxpxPC4=; b=liNyiupazwRon+5Af2NWfLr70i7v4cxsvdLA1dCxZbZq/H91szeK9fD7I9Bu3lxOoiUDxdqQp70FPjZtVGYZh4A+JjQw58jvMLOManE+O8vPG7Tqo4OxyGZSG6V2xrzp8Ky2cMjAAbrH8+z1VaWlCfg53Qdy+Ral7+T9oCCfIFo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565941477014816.0699400950808; Fri, 16 Aug 2019 00:44:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3BEA30832E1; Fri, 16 Aug 2019 07:44:34 +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 B1D688460D; Fri, 16 Aug 2019 07:44:33 +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 5A49D2551C; Fri, 16 Aug 2019 07:44:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7G7hUqn015493 for ; Fri, 16 Aug 2019 03:43:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id A1C9F61B62; Fri, 16 Aug 2019 07:43:30 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CD86612AB for ; Fri, 16 Aug 2019 07:43:27 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 16 Aug 2019 09:43:27 +0200 Message-Id: <5c825fd4ede2edf3705f7010c5c21eab216de9dd.1565941407.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: virpcimock: Always declare __open_2 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 16 Aug 2019 07:44:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In some cases e.g. with clang on fedora 30 __open2 isn't even declared which results in the following build error: /home/pipo/libvirt/tests/virpcimock.c:939:1: error: no previous prototype f= or function '__open_2' [-Werror,-Wmissing-prototypes] __open_2(const char *path, int flags) Add a separate declaration to appease the compiler. Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- tests/virpcimock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 829d61cd3f..cfe91ba3ff 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -935,6 +935,11 @@ open(const char *path, int flags, ...) } +/* in some cases this function may not be present in headers, so we need + * a declaration to silence the complier */ +int +__open_2(const char *path, int flags); + int __open_2(const char *path, int flags) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list