From: Michal Privoznik <mprivozn@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] syscall.c: Fix build with older linux-headers
Date: Tue, 16 Aug 2016 12:31:32 +0200 [thread overview]
Message-ID: <6169abd0-4b13-081d-4b99-d3449c495535@redhat.com> (raw)
In-Reply-To: <CAFEAcA_cfknciANzObU2d6TiyZ3_0ju9bTMU8o4guqwgeM9_BA@mail.gmail.com>
On 16.08.2016 12:04, Peter Maydell wrote:
> On 16 August 2016 at 10:47, Michal Privoznik <mprivozn@redhat.com> 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 <mprivozn@redhat.com>
>> ---
>> 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 ?
Yeah, I was worried about that too, but no. My compiler must be wise
enough to realize what is going on. I see no error, nor warning.
Michal
next prev parent reply other threads:[~2016-08-16 10:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 9:47 [Qemu-devel] [PATCH] syscall.c: Fix build with older linux-headers Michal Privoznik
2016-08-16 10:04 ` Peter Maydell
2016-08-16 10:31 ` Michal Privoznik [this message]
2016-08-16 15:41 ` Peter Maydell
2016-08-16 16:41 ` Laurent Vivier
2016-08-16 16:51 ` Peter Maydell
2016-08-16 16:57 ` Michal Privoznik
2016-08-16 17:28 ` Laurent Vivier
2016-08-16 17:31 ` Peter Maydell
2016-08-16 17:39 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6169abd0-4b13-081d-4b99-d3449c495535@redhat.com \
--to=mprivozn@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).