From patchwork Wed Jan 30 22:16:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Santana X-Patchwork-Id: 50099 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA1601B3B9; Wed, 30 Jan 2019 23:16:09 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 4CF521B3B9 for ; Wed, 30 Jan 2019 23:16:08 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A1DEC05E740; Wed, 30 Jan 2019 22:16:07 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.18.25.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 748559068; Wed, 30 Jan 2019 22:16:04 +0000 (UTC) From: Michael Santana To: dev@dpdk.org Cc: Aaron Conole , Bruce Richardson , Honnappa Nagarahalli , Thomas Monjalon Date: Wed, 30 Jan 2019 17:16:01 -0500 Message-Id: <20190130221602.13866-2-msantana@redhat.com> In-Reply-To: <20190130221602.13866-1-msantana@redhat.com> References: <20190123220714.20763-1-msantana@redhat.com> <20190130221602.13866-1-msantana@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 30 Jan 2019 22:16:07 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2 1/2] examples/vhost_scsi: Don't build without virtio_scsi.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Aaron Conole The vhost_scsi example code is set to build, even if the requisite header file virtio_scsi.h isn't available. This happens on some Ubuntu systems when some versions of the libc-dev package aren't available. Check whether the virtio_scsi.h file exists, and if not, set the build flag to false. Signed-off-by: Aaron Conole Acked-by: Bruce Richardson --- v2: Introduced. examples/vhost_scsi/meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build index 2303bcaed..3bff05c81 100644 --- a/examples/vhost_scsi/meson.build +++ b/examples/vhost_scsi/meson.build @@ -9,6 +9,12 @@ if host_machine.system() != 'linux' build = false endif + +cc = meson.get_compiler('c') +if not cc.has_header('virtio_scsi.h') + build = false +endif + deps += 'vhost' cflags += ['-D_FILE_OFFSET_BITS=64'] sources = files(