[libvirt] [PATCH 1/2] cleanup: make nlComm commonly available
Stefan Berger
stefanb at linux.vnet.ibm.com
Tue Jun 21 23:29:01 UTC 2011
On 06/21/2011 04:32 PM, Eric Blake wrote:
> On 06/21/2011 10:08 AM, Stefan Berger wrote:
>> In a first cleanup step, make nlComm from macvtap.c commonly available
>> for other code to use. Since nlComm uses Linux-specific structures as
>> parameters it's prototype is only visible on Linux.
>>
>> Signed-off-by: Stefan Berger<stefanb at linux.vnet.ibm.com>
>>
>> ---
>> src/Makefile.am | 1
>> src/libvirt_private.syms | 4 +
> The code motion looks okay to me. However:
>
> Exporting the private symbols says the symbols must be available
> everywhere...
>
>> +#if __linux__
>> +int nlComm(struct nl_msg *nl_msg,
>> + unsigned char **respbuf, unsigned int *respbuflen,
>> + int nl_pid)
>> +{
>> +
>> +#endif /* __linux__ */
> so you should provide an #else clause with a dummy implementation that
> always fails, as well as a dummy:
>
> struct nl_msg;
>
> forward prototype to allow compilation on non-Linux.
>
Alright. Will prepare a v2.
Stefan
More information about the libvir-list
mailing list