qemu-devel
[Top][All Lists]
Advanced

[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: Michal Privoznik
Subject: Re: [Qemu-devel] [PATCH] syscall.c: Fix build with older linux-headers
Date: Tue, 16 Aug 2016 18:57:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 16.08.2016 18:51, Peter Maydell wrote:
> On 16 August 2016 at 17:41, Laurent Vivier <address@hidden> 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 <address@hidden>
>>
>> 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?
> 
> Michal, can you produce a patch?

Oh right. Sorry guys, I don't know what I've been thinking producing
such a silly patch in the first place. Sorry for the noise. I'll send fixup!

Michal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]