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: Daniel P . Berrangé
Subject: Re: [PATCH v2 1/4] Include new arbitrary limits if not already defined
Date: Mon, 22 Jan 2024 17:26:41 +0000
User-agent: Mutt/2.2.10 (2023-03-25)

On Thu, Jan 18, 2024 at 05:02:23PM +0100, Manolo de Medici 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.

Please give details of what platform(s) lack these constants
in the commit message.

Presumably this is a platform that is outside of our normal
support build target list, since we have at least build
coverage for everything mainstream.

> 
> 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

If we're going to add this, since we should be removing the
later duplication:

  #define IOV_MAX 1024

in this same file

> +
>  /* 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. */
> --
> 2.43.0
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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