[libvirt] [PATCH] build: trivial fix error: implicit declaration of function 'malloc'
Eric Blake
eblake at redhat.com
Thu Nov 22 13:49:49 UTC 2012
On 11/22/2012 06:36 AM, Daniel P. Berrange wrote:
>> util/processinfo.c: In function 'virProcessInfoSetAffinity':
>> util/processinfo.c:52:5: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration]
>>
> mask = CPU_ALLOC(numcpus);
>
> On glibc this is defined to a function _sched_cpualloc(), hence
> we don't see a warning.
>
> If your headers are defining this in terms of malloc(), then IMHO,
> the sched.h should be including stdlib.h on our behalf. IOW, I
> think this is a bug in the c library headers
>
> That all said, I'm not against adding this workaround in libvirt,
> provided the c library bug is reported upstream.
Concur on both points. And I pushed the commit.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121122/9ae5c189/attachment-0001.sig>
More information about the libvir-list
mailing list