Skip to contentSkip to conversation

FreeBSD ppc_init_cacheline_sizes(): add missing #includes

PATCH In review Juergen Lock 3 participants 4 messages Mar 12, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FreeBSD ppc_init_cacheline_sizes(): add missing #includes

This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b. (The bug was mine actually...)

Submitted by: Andreas Tobler <[email protected]>

cache-utils.c +3 -0
@@ -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>
 
#1 lore raw
Quoted 10 lines · Juergen Lock

This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b. (The bug was mine actually...)

Submitted by: Andreas Tobler <[email protected]>

cache-utils.c static void ppc_init_cacheline_sizes(voi · line 63

Quoted 6 lines
cache-utils.c +2 -0
@@ -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?

Quoted 6 lines
cache-utils.c +1 -0
+#include <string.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>
 
Signature · 1 line
mailto:[email protected]
#2 lore raw
Quoted 14 lines · malc
Quoted 12 lines · Juergen Lock

This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b. (The bug was mine actually...)

Submitted by: Andreas Tobler<[email protected]>

cache-utils.c +0 -0
@@ -58,7 +58,10 @@ static void ppc_init_cacheline_sizes(voi
  #endif
 
Quoted 6 lines

cache-utils.c static void ppc_init_cacheline_sizes(voi · line 63

Quoted 4 lines
cache-utils.c +2 -0
  #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

#3 lore raw
Quoted 22 lines · Andreas Tobler
Quoted 14 lines · malc
Quoted 12 lines · Juergen Lock

This fixes commit e4ee916d3f9a93df06bd498c92767c1558d59a0b. (The bug was mine actually...)

Submitted by: Andreas Tobler<[email protected]>

cache-utils.c +0 -0
@@ -58,7 +58,10 @@ static void ppc_init_cacheline_sizes(voi
  #endif
 
Quoted 6 lines

cache-utils.c static void ppc_init_cacheline_sizes(voi · line 63

Quoted 4 lines
cache-utils.c +2 -0
  #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include<errno.h>
  #include<stdio.h>
+#include<stdlib.h>

And stdlib is needed for what exactly?

Quoted 4 lines

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.

Signature · 1 line
mailto:[email protected]