Re: [PATCH] build: trivial fix error: implicit declaration of function 'malloc'

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

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]