From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 31CEF1B415 for ; Thu, 31 Jan 2019 10:15:34 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2019 01:15:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,543,1539673200"; d="scan'208";a="134688969" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.54]) by orsmga001.jf.intel.com with SMTP; 31 Jan 2019 01:15:30 -0800 Received: by (sSMTP sendmail emulation); Thu, 31 Jan 2019 09:15:29 +0000 Date: Thu, 31 Jan 2019 09:15:29 +0000 From: Bruce Richardson To: Michael Santana Cc: dev@dpdk.org, Aaron Conole , Honnappa Nagarahalli , Thomas Monjalon Message-ID: <20190131091529.GB122080@bricha3-MOBL.ger.corp.intel.com> References: <20190123220714.20763-1-msantana@redhat.com> <20190130221602.13866-1-msantana@redhat.com> <20190130221602.13866-2-msantana@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190130221602.13866-2-msantana@redhat.com> User-Agent: Mutt/1.11.2 (2019-01-07) Subject: Re: [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: , X-List-Received-Date: Thu, 31 Jan 2019 09:15:34 -0000 On Wed, Jan 30, 2019 at 05:16:01PM -0500, Michael Santana wrote: > 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 > --- > 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 > + We already assign "cc" at the top level meson.build file, so it's not needed to be repeated here. We could merge the if conditions, but it's probably more readable this way, so with the "cc = " line removed: Acked-by: Bruce Richardson > deps += 'vhost' > cflags += ['-D_FILE_OFFSET_BITS=64'] > sources = files( > -- > 2.19.1 >