aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-11 19:12:59 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-11 19:12:59 +0000
commit4710036affbd9e88c40d433c3417f3d74f166f4d (patch)
treef3cf63d17d50b07a1be6f4f2fc9beaee2e6a9054 /cache-utils.c
parentFix compiling without MREMAP_FIXED (diff)
downloadqemu-kvm-4710036affbd9e88c40d433c3417f3d74f166f4d.tar.gz
qemu-kvm-4710036affbd9e88c40d433c3417f3d74f166f4d.tar.bz2
qemu-kvm-4710036affbd9e88c40d433c3417f3d74f166f4d.zip
Don't require linux/auxvec.h, which isn't always installed with libc.
I'm cross-compiling, and linux/auxvec.h was not installed with my glibc headers. How about this: Don't require linux/auxvec.h, which isn't always installed with libc. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5980 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cache-utils.c')
-rw-r--r--cache-utils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cache-utils.c b/cache-utils.c
index 0b4a5acb8..52aba64b7 100644
--- a/cache-utils.c
+++ b/cache-utils.c
@@ -16,7 +16,10 @@ static void ppc_init_cacheline_sizes(void)
}
#elif defined __linux__
-#include <linux/auxvec.h>
+
+#define QEMU_AT_NULL 0
+#define QEMU_AT_DCACHEBSIZE 19
+#define QEMU_AT_ICACHEBSIZE 20
static void ppc_init_cacheline_sizes(char **envp)
{
@@ -24,10 +27,10 @@ static void ppc_init_cacheline_sizes(char **envp)
while (*envp++);
- for (auxv = (unsigned long *) envp; *auxv != AT_NULL; auxv += 2) {
+ for (auxv = (unsigned long *) envp; *auxv != QEMU_AT_NULL; auxv += 2) {
switch (*auxv) {
- case AT_DCACHEBSIZE: qemu_cache_conf.dcache_bsize = auxv[1]; break;
- case AT_ICACHEBSIZE: qemu_cache_conf.icache_bsize = auxv[1]; break;
+ case QEMU_AT_DCACHEBSIZE: qemu_cache_conf.dcache_bsize = auxv[1]; break
+ case QEMU_AT_ICACHEBSIZE: qemu_cache_conf.icache_bsize = auxv[1]; break
default: break;
}
}