Messages in this thread Patch in this message | | | Date | Wed, 14 Nov 2001 12:52:16 -0500 (EST) | From | Chris Meadors <> | Subject | Re: 2.4.15-pre4 fails to build in setup.c |
| |
On Wed, 14 Nov 2001, Chris Meadors wrote:
> I don't think I've seen this yet. > > Build failed with this error: > > gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes > -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common > -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -c > -o setup.o setup.c > setup.c: In function `c_start': > setup.c:2791: subscripted value is neither array nor pointer > setup.c:2792: warning: control reaches end of non-void function > make[1]: *** [setup.o] Error 1 > make[1]: Leaving directory `/usr/src/linux/arch/i386/kernel' > make: *** [_dir_arch/i386/kernel] Error 2 > > My "grep ^CONFIG .config" is attatched. > > -Chris >
I'm replying to my own post because I've received serveral off list replies. None of them quite correct. It seems there are two files that need to be patched.
I'm attaching the patch that finally allowed my kernel to compile. It is mostly the one that Horst von Brand sent me (which he said Linus prescribed), but with a correction to the first hunk.
-Chris -- Two penguins were walking on an iceberg. The first penguin said to the second, "you look like you are wearing a tuxedo." The second penguin said, "I might be..." --David Lynch, Twin Peaks
--- linux-2.4/arch/i386/kernel/setup.c~ Wed Nov 14 13:19:43 2001 +++ linux-2.4/arch/i386/kernel/setup.c Wed Nov 14 13:19:53 2001 @@ -2788,7 +2788,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) { - return *pos < NR_CPUS ? &cpu_data[*pos] : NULL; + return *pos < NR_CPUS ? cpu_data + *pos : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) { --- linux-2.4/include/asm-i386/processor.h~ Wed Nov 14 11:52:39 2001 +++ linux-2.4/include/asm-i386/processor.h Wed Nov 14 13:18:47 2001 @@ -76,7 +76,7 @@ extern struct cpuinfo_x86 cpu_data[]; #define current_cpu_data cpu_data[smp_processor_id()] #else -#define cpu_data &boot_cpu_data +#define cpu_data (&boot_cpu_data) #define current_cpu_data boot_cpu_data #endif
| |