On 6 November 2017 at 00:56, Brad Smith <b...@comstyle.com> wrote:
> Define TIME_MAX to LLONG_MAX for OpenBSD since OpenBSD uses 64-bit time_t.
>
> Signed-off-by: Brad Smith <b...@comstyle.com>
>
>
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index 6855b94bbf..824714049b 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -132,8 +132,12 @@ extern int daemon(int, int);
>  #define ESHUTDOWN 4099
>  #endif
>  #ifndef TIME_MAX
> +#ifdef __OpenBSD__
> +#define TIME_MAX LLONG_MAX
> +#else
>  #define TIME_MAX LONG_MAX
>  #endif
> +#endif

I'm not really a fan of adding new OS-specific #ifdefs --
what if one of the other BSDs uses or switches to 64-bit
time_t for 32-bit platforms? Is there some way we can detect
this generically at compile time (possibly in configure) ?

thanks
-- PMM

Reply via email to