Most recent kernel where this bug did not occur: 2.6.16.1 Distribution:Debian Hardware Environment:sun netra 1405 4 proc 4Go RAM Software Environment:gcc 3.3.5 (debian) Problem Description: while compiling kernel, gcc halts with th following error : In file included from arch/sparc64/kernel/sparc64_ksyms.c:28: include/net/compat.h:40: warning: `struct sock' declared inside parameter list include/net/compat.h:40: warning: its scope is only this definition or declaration, which is probably not what you want make[2]: *** [arch/sparc64/kernel/sparc64_ksyms.o] Error 1 Steps to reproduce: tar jxvf linux-2.6.16 ; patch -p1 < patch-2.6.17-rc5 ; make -j5 Solution : (it works but may be dirty) in include/net/compat.h add declaration of struct sock AFTER #endif /* defined(CONFIG_COMPAT) */