summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAaron Conole <aconole@redhat.com>2019-02-07 17:01:13 -0500
committerThomas Monjalon <thomas@monjalon.net>2019-02-27 15:05:59 +0100
commit8d47a753b7cb05e0ef62360324c6a28505038d09 (patch)
treeb1576fba5edbdfb267833539b422e1d59d9cae63 /examples
parent3fe9b93c8d6b8d1cc7f148002ce1ea098b60fcbd (diff)
downloaddpdk-next-eventdev-8d47a753b7cb05e0ef62360324c6a28505038d09.zip
dpdk-next-eventdev-8d47a753b7cb05e0ef62360324c6a28505038d09.tar.gz
dpdk-next-eventdev-8d47a753b7cb05e0ef62360324c6a28505038d09.tar.xz
examples/vhost_scsi: disable build if missing dependency
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 <aconole@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/vhost_scsi/meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build
index 2303bca..ca12480 100644
--- a/examples/vhost_scsi/meson.build
+++ b/examples/vhost_scsi/meson.build
@@ -9,6 +9,11 @@
if host_machine.system() != 'linux'
build = false
endif
+
+if not cc.has_header('virtio_scsi.h')
+ build = false
+endif
+
deps += 'vhost'
cflags += ['-D_FILE_OFFSET_BITS=64']
sources = files(