projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06f7332
)
Properly initialize len argument of sysctl and include stdio.h (perror)
author
malc
<malc@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 4 Feb 2009 20:39:09 +0000
(20:39 +0000)
committer
malc
<malc@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 4 Feb 2009 20:39:09 +0000
(20:39 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6517
c046a42c
-6fe2-441c-8c8c-
71466251a162
cache-utils.c
patch
|
blob
|
history
diff --git
a/cache-utils.c
b/cache-utils.c
index b37ddd4992f8b7660c52dd8c224882c14b963e8f..45d62c91c5030393aa1b2cd4838eaee88cfda746 100644
(file)
--- a/
cache-utils.c
+++ b/
cache-utils.c
@@
-37,6
+37,7
@@
static void ppc_init_cacheline_sizes(char **envp)
}
#elif defined __APPLE__
+#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
@@
-46,6
+47,7
@@
static void ppc_init_cacheline_sizes(void)
unsigned cacheline;
int name[2] = { CTL_HW, HW_CACHELINE };
+ len = sizeof(cacheline);
if (sysctl(name, 2, &cacheline, &len, NULL, 0)) {
perror("sysctl CTL_HW HW_CACHELINE failed");
} else {