summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorGreg V <greg@unrelenting.technology>2018-01-19 00:48:30 +0300
committerEric Engestrom <eric.engestrom@intel.com>2019-08-08 21:44:33 +0100
commitc0dc5c1859b665164a34028649ffaf4a2712b212 (patch)
tree7c5e6096e4053fb7014a5f6f86e66612fa309a3f /meson.build
parent28061e0ab03dcbcaad32c66fa8f427d94a09c5a0 (diff)
meson: define ETIME to ETIMEDOUT if not present
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 593bfeebd5a..06953b364a8 100644
--- a/meson.build
+++ b/meson.build
@@ -778,6 +778,11 @@ if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
error('When using GCC, version 4.4.6 or later is required.')
endif
+# Support systems without ETIME (e.g. FreeBSD)
+if cc.get_define('ETIME', prefix : '#include <errno.h>') == ''
+ pre_args += '-DETIME=ETIMEDOUT'
+endif
+
# Define DEBUG for debug builds only (debugoptimized is not included on this one)
if get_option('buildtype') == 'debug'
pre_args += '-DDEBUG'