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

Nicolai Hähnle nhaehnle at gmail.com
Wed Nov 15 11:21:47 UTC 2017


On 13.11.2017 23:55, Rob Herring wrote:
> 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>

The issue with this is that it makes the compiler unhappy when 
timespec_get *is* available. I'm looking at adding a configure check.

Cheers,
Nicolai

> 
> Rob
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list