[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 30/34] xen: Add missing includes on different files

Hi Jan,

Sorry for the late answer.

On 03/27/2014 07:57 AM, Jan Beulich wrote:
>>>> On 26.03.14 at 18:41, <julien.grall@xxxxxxxxxx> wrote:
>> On 03/26/2014 12:57 PM, Jan Beulich wrote:
>>>>>> On 25.03.14 at 17:55, <julien.grall@xxxxxxxxxx> wrote:
>>>> --- a/xen/common/multicall.c
>>>> +++ b/xen/common/multicall.c
>>>> @@ -6,6 +6,9 @@
>>>>  #include <xen/types.h>
>>>>  #include <xen/lib.h>
>>>>  #include <xen/mm.h>
>>>> +#ifndef COMPAT
>>>> +#include <xen/hypercall.h>
>>>> +#endif
>>> Is there anything wrong with adding this without the seemingly
>>> unmotivated #ifndef?
>> The prototype in hypercall.h return directly long, but the definition
>> returns ret_t (which is replaced by int if COMPAT is defined).
>> This will result to a compilation failure:
>> In file included from multicall.c:41:0:
>> ../multicall.c:38:1: error: conflicting types for âcompat_multicallâ
>> In file included from ../multicall.c:9:0,
>>                  from multicall.c:41:
> Meaning this needs to be dealt with differently: Include the header in
> both files _and_ add a declaration of compat_multicall() to it (alongside
> the other compat_ ones already there).

I gave a look to this solution. It won't works because do_multicall is
replaced by the define in compat/multicall.c:26. It will end up to
multiple definition of compat_multcall.

I'm not sure how to handle it because, AFAIU, compat/multicall.c is
defining some macro to redefine the behavior of multicall.c


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.