[PATCH 1/9] include: Add struct timespec.

Rémi Bernon rbernon at codeweavers.com
Mon Nov 29 11:15:28 CST 2021


On 11/29/21 18:01, Zebediah Figura wrote:
> Windows does not use _TIMESPEC_DEFINED, but it also doesn't use other similar
> macros which we use (e.g. _CLOCK_T_DEFINED), and we will need it to bundle
> winpthreads.
> 
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
>   include/msvcrt/time.h | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h
> index c0db38ff7a3..eb282113c86 100644
> --- a/include/msvcrt/time.h
> +++ b/include/msvcrt/time.h
> @@ -29,6 +29,17 @@ typedef __msvcrt_long clock_t;
>   #define _CLOCK_T_DEFINED
>   #endif
>   
> +#ifndef _CRT_NO_TIME_T
> +#ifndef _TIMESPEC_DEFINED
> +#define _TIMESPEC_DEFINED
> +struct timespec
> +{
> +    time_t tv_sec;
> +    __msvcrt_long tv_nsec;
> +};
> +#endif
> +#endif
> +
>   #ifndef CLOCKS_PER_SEC
>   #define CLOCKS_PER_SEC 1000
>   #endif
> 

Oof, I know I've been advocating for the in-tree import the third-party 
dependencies, but importing winpthreads feels awkward to me.

Wouldn't it be simpler to add support for using Win32 platform 
primitives in vkd3d when built as PE instead?
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list