From c0dc5c1859b665164a34028649ffaf4a2712b212 Mon Sep 17 00:00:00 2001 From: Greg V Date: Fri, 19 Jan 2018 00:48:30 +0300 Subject: [PATCH] meson: define ETIME to ETIMEDOUT if not present Reviewed-by: Eric Engestrom --- meson.build | 5 +++++ src/gallium/drivers/iris/iris_bufmgr.c | 3 --- src/mesa/drivers/dri/i965/brw_bufmgr.c | 3 --- 3 files changed, 5 insertions(+), 6 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 ') == '' + 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' diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index d5e7a1e85ba..e34c8f34912 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -51,9 +51,6 @@ #include #include "errno.h" -#ifndef ETIME -#define ETIME ETIMEDOUT -#endif #include "common/gen_clflush.h" #include "dev/gen_debug.h" #include "common/gen_gem.h" diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index a7c68406315..c19e87fd82e 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c @@ -49,9 +49,6 @@ #include #include "errno.h" -#ifndef ETIME -#define ETIME ETIMEDOUT -#endif #include "common/gen_clflush.h" #include "dev/gen_debug.h" #include "common/gen_gem.h" -- 2.30.2