[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] syscall.c: Fix build with older linux-headers
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] syscall.c: Fix build with older linux-headers |
Date: |
Tue, 16 Aug 2016 11:04:24 +0100 |
On 16 August 2016 at 10:47, Michal Privoznik <address@hidden> wrote:
> In c5dff280 we tried to make us understand netlink messages more.
> So we've added a code that does some translation. However, the
> code assumed linux-headers to be at least version 4.4 of it
> because most of the symbols there (if not all of them) were added
> in just that release. This, however, breaks build on systems with
> older versions of the package.
>
> Signed-off-by: Michal Privoznik <address@hidden>
> ---
> linux-user/syscall.c | 86
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 86 insertions(+)
> u32 = NLA_DATA(nlattr);
> *u32 = tswap32(*u32);
> break;
> /* uint64_t */
> +#ifdef IFLA_BR_HELLO_TIMER
> case IFLA_BR_HELLO_TIMER:
> +#endif
> +#ifdef IFLA_BR_TCN_TIMER
> case IFLA_BR_TCN_TIMER:
> +#endif
> +#ifdef IFLA_BR_GC_TIMER
> case IFLA_BR_GC_TIMER:
> +#endif
> +#ifdef IFLA_BR_TOPOLOGY_CHANGE_TIMER
> case IFLA_BR_TOPOLOGY_CHANGE_TIMER:
> +#endif
> +#ifdef IFLA_BR_MCAST_LAST_MEMBER_INTVL
> case IFLA_BR_MCAST_LAST_MEMBER_INTVL:
> +#endif
> +#ifdef IFLA_BR_MCAST_MEMBERSHIP_INTVL
> case IFLA_BR_MCAST_MEMBERSHIP_INTVL:
> +#endif
> +#ifdef IFLA_BR_MCAST_QUERIER_INTVL
> case IFLA_BR_MCAST_QUERIER_INTVL:
> +#endif
> +#ifdef IFLA_BR_MCAST_QUERY_INTVL
> case IFLA_BR_MCAST_QUERY_INTVL:
> +#endif
> +#ifdef IFLA_BR_MCAST_QUERY_RESPONSE_INTVL
> case IFLA_BR_MCAST_QUERY_RESPONSE_INTVL:
> +#endif
> +#ifdef IFLA_BR_MCAST_STARTUP_QUERY_INTVL
> case IFLA_BR_MCAST_STARTUP_QUERY_INTVL:
> +#endif
> u64 = NLA_DATA(nlattr);
> *u64 = tswap64(*u64);
> break;
> /* ifla_bridge_id: uin8_t[] */
> +#ifdef IFLA_BR_ROOT_ID
> case IFLA_BR_ROOT_ID:
> +#endif
> +#ifdef IFLA_BR_BRIDGE_ID
> case IFLA_BR_BRIDGE_ID:
> +#endif
> break;
Aren't there complaints about unreachable code if the
defines are all undefined ?
thanks
-- PMM