From: Greg V Date: Thu, 18 Jan 2018 21:48:30 +0000 (+0300) Subject: meson: define ETIME to ETIMEDOUT if not present X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0dc5c1859b665164a34028649ffaf4a2712b212;p=mesa.git meson: define ETIME to ETIMEDOUT if not present Reviewed-by: Eric Engestrom --- 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"