Commit 932d61ae authored by Florian Fischer's avatar Florian Fischer
Browse files

client/io_uring: fix build for compilers without latch header

parent cc91328b
Pipeline #72810 failed with stage
in 1 minute and 52 seconds
......@@ -10,10 +10,17 @@
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <latch>
#include <thread>
#include <vector>
#include "config.h"
#ifdef CPP_HAS_LATCH_H
#include <latch>
#else
#include <experimental/latch>
#endif
#define DIE_MSG(...) \
do { \
std::cout << __VA_ARGS__ << std::endl; \
......
......@@ -19,6 +19,15 @@ if not uring_dep.found()
endif
dependencies = [thread_dep, uring_dep]
conf_data = configuration_data()
cpp_compiler = meson.get_compiler('cpp')
if cpp_compiler.has_header('latch')
conf_data.set('CPP_HAS_LATCH_H', true)
endif
config_header = configure_file(output: 'config.h', configuration: conf_data)
client = executable(
'client',
'client.cpp',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment