[Mesa-dev] [PATCH] threads: fix MinGW build breakage

Rob Herring robh at kernel.org
Mon Nov 13 22:55:39 UTC 2017


On Fri, Nov 10, 2017 at 12:39 PM, Jon Turney
<jon.turney at dronecode.org.uk> wrote:
> On 10/11/2017 15:42, Nicolai Hähnle wrote:
>>
>> On 10.11.2017 14:00, Jon Turney wrote:
>>>
>>> On 09/11/2017 21:41, Nicolai Hähnle wrote:
>>>>
>>>> Sorry for the mess.
>>>
>>>
>>> I'm going to suggest that the fallback declaration of timespec_get() also
>>> needs to be provided for POSIX systems which don't have it.
>>>
>>> Not noticed previously as it (or xtime_get()) doesn't seem to have had
>>> any users, prior to this series.
>>>
>>> Patch attached.
>>
>>
>> Do you have a system where this is actually needed? Currently
>> HAVE_TIMESPEC_GET is only defined in threads_win32.h, so some more detection
>> logic somewhere would be required if this actually turns out to be an issue.
>
>
> Hmm.. yes, I'd assumed that HAVE_TIMESPEC_GET was the result of an autoconf
> check, but it isn't.
>
> Cygwin doesn't (currently) have timespec_get().
>
> I'm thinking the correct solution here is actually to unconditionally
> declare timespec_get(), just like all the other C11 thread functions (and as
> the unused xtime_get() was, prior to
> f1a364878431c8c5f4fd38b40b9766449e49f552)?
>
> Revised patch attached.

That should fix Android builds.

Acked-by: Rob Herring <robh at kernel.org>

Rob


More information about the mesa-dev mailing list