[PATCH, BUILD-FIX] linux-user: Conditionalize TUNSETVNETLE

Richard Henderson posted 1 patch 4 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210104234415.405521-1-richard.henderson@linaro.org
Maintainers: Laurent Vivier <laurent@vivier.eu>
linux-user/ioctls.h | 2 ++
1 file changed, 2 insertions(+)
[PATCH, BUILD-FIX] linux-user: Conditionalize TUNSETVNETLE
Posted by Richard Henderson 4 years, 10 months ago
This fixes the build for older ppc64 kernel headers.

Fixes: 6addf06a3c4
Cc: Josh Kunz <jkz@google.com>
Cc: Shu-Chun Weng <scw@google.com>
Cc: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/ioctls.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 661b5daa9f..7193c3b226 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -748,8 +748,10 @@
   IOCTL(TUNSETQUEUE,     IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
   IOCTL(TUNSETIFINDEX ,  IOC_W, MK_PTR(TYPE_INT))
   /* TUNGETFILTER is not supported: see TUNATTACHFILTER. */
+#ifdef TUNSETVNETLE
   IOCTL(TUNSETVNETLE,    IOC_W, MK_PTR(TYPE_INT))
   IOCTL(TUNGETVNETLE,    IOC_R, MK_PTR(TYPE_INT))
+#endif
 #ifdef TUNSETVNETBE
   IOCTL(TUNSETVNETBE,    IOC_W, MK_PTR(TYPE_INT))
   IOCTL(TUNGETVNETBE,    IOC_R, MK_PTR(TYPE_INT))
-- 
2.25.1


Re: [PATCH, BUILD-FIX] linux-user: Conditionalize TUNSETVNETLE
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
On 1/5/21 12:44 AM, Richard Henderson wrote:
> This fixes the build for older ppc64 kernel headers.
> 
> Fixes: 6addf06a3c4
> Cc: Josh Kunz <jkz@google.com>
> Cc: Shu-Chun Weng <scw@google.com>
> Cc: Laurent Vivier <laurent@vivier.eu>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/ioctls.h | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH, BUILD-FIX] linux-user: Conditionalize TUNSETVNETLE
Posted by Laurent Vivier 4 years, 10 months ago
Le 05/01/2021 à 00:44, Richard Henderson a écrit :
> This fixes the build for older ppc64 kernel headers.
> 
> Fixes: 6addf06a3c4
> Cc: Josh Kunz <jkz@google.com>
> Cc: Shu-Chun Weng <scw@google.com>
> Cc: Laurent Vivier <laurent@vivier.eu>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/ioctls.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index 661b5daa9f..7193c3b226 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -748,8 +748,10 @@
>    IOCTL(TUNSETQUEUE,     IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
>    IOCTL(TUNSETIFINDEX ,  IOC_W, MK_PTR(TYPE_INT))
>    /* TUNGETFILTER is not supported: see TUNATTACHFILTER. */
> +#ifdef TUNSETVNETLE
>    IOCTL(TUNSETVNETLE,    IOC_W, MK_PTR(TYPE_INT))
>    IOCTL(TUNGETVNETLE,    IOC_R, MK_PTR(TYPE_INT))
> +#endif
>  #ifdef TUNSETVNETBE
>    IOCTL(TUNSETVNETBE,    IOC_W, MK_PTR(TYPE_INT))
>    IOCTL(TUNGETVNETBE,    IOC_R, MK_PTR(TYPE_INT))
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>