Skip to content

Commit

Permalink
examples/l2fwd-keepalive: skip meson build if no librt
Browse files Browse the repository at this point in the history
[ upstream commit b334236 ]

When librt is not present on a system, processing the meson.build file
for this example application causes an error. Make the library
non-mandatory and just mark the example as unbuildable if it is
not present.

Fixes: 89f0711 ("examples: build some samples with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
  • Loading branch information
bruce-richardson authored and bluca committed Nov 16, 2020
1 parent 44b8800 commit 298d935
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/l2fwd-keepalive/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
# To build this example as a standalone application with an already-installed
# DPDK instance, use 'make'

ext_deps += cc.find_library('rt')
librt = cc.find_library('rt', required: false)
if not librt.found()
build = false
subdir_done()
endif

ext_deps += librt
deps += 'timer'
sources = files(
'main.c', 'shm.c'
Expand Down

0 comments on commit 298d935

Please sign in to comment.