From: Manolo de Medici Date: Sun, 8 Feb 2026 05:59:19 +0000 (+0000) Subject: Include new arbitrary limits if not already defined X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff8d820da87e4a45caffef6ef212b7a6d74ec96d;p=thirdparty%2Fqemu.git Include new arbitrary limits if not already defined Although GNU/Hurd supports unlimited path lengths only bounded by available memory, for now we can use an arbitrary limit on PATH_MAX that matches what POSIX requires. We don't have bandwidth to fix this properly right now. Author: Manolo de Medici Signed-off-by: Damien Zammit Link: https://lore.kernel.org/r/20260208055858.2166524-2-damien@zamaudio.com Signed-off-by: Paolo Bonzini --- diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 2f0e61ad6b..1ec5b42230 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -384,6 +384,17 @@ void QEMU_ERROR("code path is reachable") #define TIME_MAX TYPE_MAXIMUM(time_t) #endif +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +/* + * Use the same value as Linux for now. + */ +#ifndef IOV_MAX +#define IOV_MAX 1024 +#endif + /* Mac OSX has a 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. */ @@ -661,10 +672,6 @@ struct iovec { void *iov_base; size_t iov_len; }; -/* - * Use the same value as Linux for now. - */ -#define IOV_MAX 1024 ssize_t readv(int fd, const struct iovec *iov, int iov_cnt); ssize_t writev(int fd, const struct iovec *iov, int iov_cnt);