From: David van Moolenbroek Date: Wed, 5 Nov 2014 14:07:38 +0000 (+0000) Subject: procfs: compile in x86 support only for x86 target X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=7ee000e54a7f5264d9107738c3ddf750b89c1fb1;p=minix.git procfs: compile in x86 support only for x86 target Issue reported by Emmanuel Blot. Change-Id: I7f5b1b65273e6ac841d5451e0be7b0e1c92d537c --- diff --git a/minix/fs/procfs/cpuinfo.c b/minix/fs/procfs/cpuinfo.c index cdf28ac9d..3d7d5a7ba 100644 --- a/minix/fs/procfs/cpuinfo.c +++ b/minix/fs/procfs/cpuinfo.c @@ -1,10 +1,13 @@ #include "inc.h" +#if defined(__i386__) #include "../../kernel/arch/i386/include/archconst.h" +#endif #ifndef CONFIG_MAX_CPUS #define CONFIG_MAX_CPUS 1 #endif +#if defined(__i386__) static const char * x86_flag[] = { "fpu", "vme", @@ -72,7 +75,7 @@ static const char * x86_flag[] = { "", }; -static void print_cpu_flags(u32_t * flags) +static void print_x86_cpu_flags(u32_t * flags) { int i, j; @@ -85,6 +88,7 @@ static void print_cpu_flags(u32_t * flags) } buf_printf("\n"); } +#endif static void print_cpu(struct cpu_info * cpu_info, unsigned id) { @@ -109,7 +113,7 @@ static void print_cpu(struct cpu_info * cpu_info, unsigned id) buf_printf("%-16s: %d\n", "stepping", cpu_info->stepping); buf_printf("%-16s: %d\n", "cpu MHz", cpu_info->freq); buf_printf("%-16s: ", "flags"); - print_cpu_flags(cpu_info->flags); + print_x86_cpu_flags(cpu_info->flags); buf_printf("\n"); #endif }