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

2012-11-22 Thread Natanael Copa
On Thu, 22 Nov 2012 06:53:12 -0700 Eric Blake wrote: > On 11/22/2012 06:46 AM, Natanael Copa wrote: > >> 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 > > >

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

2012-11-22 Thread Eric Blake
On 11/22/2012 06:46 AM, Natanael Copa wrote: >> 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 > > You are right. uclibc does this: > > #if 0 /* in uClibc we use m

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

2012-11-22 Thread Eric Blake
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 defi

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

2012-11-22 Thread Natanael Copa
On Thu, 22 Nov 2012 13:36:14 + "Daniel P. Berrange" wrote: > On Thu, Nov 22, 2012 at 01:28:08PM +0100, Natanael Copa wrote: > > Fixes this error when building with -Werror on Alpine Linux: ... > > --- a/src/util/processinfo.c > > +++ b/src/util/processinfo.c > > @@ -21,6 +21,7 @@ > > > > #

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

2012-11-22 Thread Daniel P. Berrange
On Thu, Nov 22, 2012 at 01:28:08PM +0100, Natanael Copa wrote: > Fixes this error when building with -Werror on Alpine Linux: > > util/processinfo.c: In function 'virProcessInfoSetAffinity': > util/processinfo.c:52:5: error: implicit declaration of function 'malloc' > [-Werror=implicit-function-d

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

2012-11-22 Thread Natanael Copa
Fixes this error when building with -Werror on Alpine Linux: util/processinfo.c: In function 'virProcessInfoSetAffinity': util/processinfo.c:52:5: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration] Signed-off-by: Natanael Copa --- src/util/processinfo.c |