From: Laurent Vivier <laurent@vivier.eu>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Michal Privoznik <mprivozn@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] syscall.c: Fix build with older linux-headers
Date: Tue, 16 Aug 2016 19:28:04 +0200 [thread overview]
Message-ID: <d94d0970-4c02-973b-71a7-b9b06710084b@vivier.eu> (raw)
In-Reply-To: <CAFEAcA8VkwA8etaNF2N_6fao-BhHaNVtDBCzF6OyTW+EXUHJDQ@mail.gmail.com>
Le 16/08/2016 à 18:51, Peter Maydell a écrit :
> On 16 August 2016 at 17:41, Laurent Vivier <laurent@vivier.eu> wrote:
>> Le 16/08/2016 à 11:47, Michal Privoznik a écrit :
>>> 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>
>>
>> Are you sure this "#ifdef" are correct while all these symbols are enums
>> not #define?
>>
>> Or do I miss something?
>
> I think you're right (some of the IFLA constants have #defines in
> the headers I have but not the IFLA_BR_ or IFLA_BRPORT_ ones).
> Unfortunately I've just committed this patch and tagged rc3, so we'll
> have to fix this up for rc4 :-(
>
> The best approach I can think of is to add something at the
> top of syscall.c that does:
> #if IFLA_BR_MAX < 9
> #define IFLA_BR_GROUP_FWD_MASK 9
> #endif
> #if IFLA_BR_MAX < 10
> #define IFLA_BR_ROOT_ID 10
> #endif
> etc etc
>
> and then we can unconditionally use the symbols in the switches.
>
> Anybody got a better idea?
Perhaps we can define our own enum with all the known values at the
moment, something like QEMU_IFLA_BR_XXX?
Thanks,
Laurent
next prev parent reply other threads:[~2016-08-16 17:28 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
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 [this message]
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=d94d0970-4c02-973b-71a7-b9b06710084b@vivier.eu \
--to=laurent@vivier.eu \
--cc=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).