bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/4] Include new arbitrary limits if not already defined


From: Peter Maydell
Subject: Re: [PATCH v2 1/4] Include new arbitrary limits if not already defined
Date: Mon, 22 Jan 2024 17:19:19 +0000

On Thu, 18 Jan 2024 at 16:03, Manolo de Medici <manolodemedici@gmail.com> wrote:
>
> qemu uses the PATH_MAX and IOV_MAX constants extensively
> in the code. Define these constants to sensible values ourselves
> if the system doesn't define them already.
>
> Signed-off-by: Manolo de Medici <manolo.demedici@gmail.com>
> ---
>  include/qemu/osdep.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index 9a405bed89..9fb6ac5c64 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -363,6 +363,14 @@ void QEMU_ERROR("code path is reachable")
>  #define TIME_MAX TYPE_MAXIMUM(time_t)
>  #endif
>
> +#ifndef PATH_MAX
> +#define PATH_MAX 1024
> +#endif
> +
> +#ifndef IOV_MAX
> +#define IOV_MAX 1024
> +#endif
> +
>  /* Mac OSX has a <stdint.h> bug that incorrectly defines SIZE_MAX with
>   * the wrong type. Our replacement isn't usable in preprocessor
>   * expressions, but it is sufficient for our needs. */

Ccing some people who know more about portability concerns
than I do...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]