mirror of https://gitlab.com/qemu-project/qemu
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
This commit is contained in:
parent
5caf7bb2c4
commit
4710036aff
|
@ -16,7 +16,10 @@ static void ppc_init_cacheline_sizes(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined __linux__
|
#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)
|
static void ppc_init_cacheline_sizes(char **envp)
|
||||||
{
|
{
|
||||||
|
@ -24,10 +27,10 @@ static void ppc_init_cacheline_sizes(char **envp)
|
||||||
|
|
||||||
while (*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) {
|
switch (*auxv) {
|
||||||
case AT_DCACHEBSIZE: qemu_cache_conf.dcache_bsize = auxv[1]; break;
|
case QEMU_AT_DCACHEBSIZE: qemu_cache_conf.dcache_bsize = auxv[1]; break
|
||||||
case AT_ICACHEBSIZE: qemu_cache_conf.icache_bsize = auxv[1]; break;
|
case QEMU_AT_ICACHEBSIZE: qemu_cache_conf.icache_bsize = auxv[1]; break
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue