diff mbox

FreeBSD ppc_init_cacheline_sizes(): add missing #includes

Message ID 20100312215015.GA29285@triton8.kn-bremen.de
State New
Headers show

Commit Message

Juergen Lock March 12, 2010, 9:50 p.m. UTC
This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b.
(The bug was mine actually...)

Submitted by: Andreas Tobler <andreast@fgznet.ch>

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

Comments

malc March 12, 2010, 9:59 p.m. UTC | #1
On Fri, 12 Mar 2010, Juergen Lock wrote:

> This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b.
> (The bug was mine actually...)
> 
> Submitted by: Andreas Tobler <andreast@fgznet.ch>
> 
> Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
> 
> --- a/cache-utils.c
> +++ b/cache-utils.c
> @@ -58,7 +58,10 @@ static void ppc_init_cacheline_sizes(voi
>  #endif
>  
>  #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> +#include <errno.h>
>  #include <stdio.h>
> +#include <stdlib.h>

And stdlib is needed for what exactly?

> +#include <string.h>
>  #include <sys/types.h>
>  #include <sys/sysctl.h>
>  
> 
>
Andreas Tobler March 12, 2010, 10:07 p.m. UTC | #2
On 12.03.10 22:59, malc wrote:
> On Fri, 12 Mar 2010, Juergen Lock wrote:
>
>> This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b.
>> (The bug was mine actually...)
>>
>> Submitted by: Andreas Tobler<andreast@fgznet.ch>
>>
>> Signed-off-by: Juergen Lock<nox@jelal.kn-bremen.de>
>>
>> --- a/cache-utils.c
>> +++ b/cache-utils.c
>> @@ -58,7 +58,10 @@ static void ppc_init_cacheline_sizes(voi
>>   #endif
>>
>>   #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
>> +#include<errno.h>
>>   #include<stdio.h>
>> +#include<stdlib.h>
>
> And stdlib is needed for what exactly?

To avoid this one:

cache-utils.c: In function 'ppc_init_cacheline_sizes':
cache-utils.c:76: warning: implicit declaration of function 'exit'

Andreas
malc March 12, 2010, 10:13 p.m. UTC | #3
On Fri, 12 Mar 2010, Andreas Tobler wrote:

> On 12.03.10 22:59, malc wrote:
> > On Fri, 12 Mar 2010, Juergen Lock wrote:
> > 
> > > This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b.
> > > (The bug was mine actually...)
> > > 
> > > Submitted by: Andreas Tobler<andreast@fgznet.ch>
> > > 
> > > Signed-off-by: Juergen Lock<nox@jelal.kn-bremen.de>
> > > 
> > > --- a/cache-utils.c
> > > +++ b/cache-utils.c
> > > @@ -58,7 +58,10 @@ static void ppc_init_cacheline_sizes(voi
> > >   #endif
> > > 
> > >   #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> > > +#include<errno.h>
> > >   #include<stdio.h>
> > > +#include<stdlib.h>
> > 
> > And stdlib is needed for what exactly?
> 
> To avoid this one:
> 
> cache-utils.c: In function 'ppc_init_cacheline_sizes':
> cache-utils.c:76: warning: implicit declaration of function 'exit'

Ok, right you are.
diff mbox

Patch

--- a/cache-utils.c
+++ b/cache-utils.c
@@ -58,7 +58,10 @@  static void ppc_init_cacheline_sizes(voi
 #endif
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <errno.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>