[Mesa-dev] [PATCH 1/5] anv: add ETIME fallback define
Greg V
greg at unrelenting.technology
Tue Oct 24 17:21:27 UTC 2017
On 10/24/2017 20:16, Dylan Baker wrote:
> Quoting Greg V (2017-10-23 13:20:39)
>> FreeBSD only has ETIMEDOUT, not ETIME
>> ---
>> src/intel/vulkan/anv_device.c | 4 ++++
>> src/intel/vulkan/anv_gem.c | 4 ++++
>> src/intel/vulkan/anv_queue.c | 4 ++++
>> 3 files changed, 12 insertions(+)
>>
>> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
>> index 67028e8da9..fab2a394ca 100644
>> --- a/src/intel/vulkan/anv_device.c
>> +++ b/src/intel/vulkan/anv_device.c
>> @@ -39,6 +39,10 @@
>>
>> #include "genxml/gen7_pack.h"
>>
> I would add a comment here that this is for FreeBSD. Alternatively you might
> consider #ifdef __FreeBSD__ since it's self documenting.
>
> Dylan
It's not just for FreeBSD, pretty much any non-Linux OS doesn't have ETIME.
>> +#ifndef ETIME
>> +#define ETIME ETIMEDOUT
>> +#endif
>> +
>> static void
>> compiler_debug_log(void *data, const char *fmt, ...)
>> { }
>> diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
>> index 34c0989108..4a885617ab 100644
>> --- a/src/intel/vulkan/anv_gem.c
>> +++ b/src/intel/vulkan/anv_gem.c
>> @@ -31,6 +31,10 @@
>>
>> #include "anv_private.h"
>>
>> +#ifndef ETIME
>> +#define ETIME ETIMEDOUT
>> +#endif
>> +
>> static int
>> anv_ioctl(int fd, unsigned long request, void *arg)
>> {
>> diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
>> index c6b2e01c62..b1662c1720 100644
>> --- a/src/intel/vulkan/anv_queue.c
>> +++ b/src/intel/vulkan/anv_queue.c
>> @@ -34,6 +34,10 @@
>>
>> #include "genxml/gen7_pack.h"
>>
>> +#ifndef ETIME
>> +#define ETIME ETIMEDOUT
>> +#endif
>> +
>> VkResult
>> anv_device_execbuf(struct anv_device *device,
>> struct drm_i915_gem_execbuffer2 *execbuf,
>> --
>> 2.14.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list