커널 2.4.20 에서 2.4.28 컴파일 할때 에러입니다;;; 도와주세요
make[2]: Entering directory `/usr/local/src/linux-2.4.28/net/core'
make[2]: Nothing to be done for `modules'.
make[2]: Leaving directory `/usr/local/src/linux-2.4.28/net/core'
make -C decnet modules
make[2]: Entering directory `/usr/local/src/linux-2.4.28/net/decnet'
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/local/src/linux-2.4.28/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=af_decnet -c -o af_decnet.o af_decnet.c
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/local/src/linux-2.4.28/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=dn_nsp_in -c -o dn_nsp_in.o dn_nsp_in.c
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/local/src/linux-2.4.28/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=dn_nsp_out -c -o dn_nsp_out.o dn_nsp_out.c
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/local/src/linux-2.4.28/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=dn_route -c -o dn_route.o dn_route.c
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/local/src/linux-2.4.28/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=dn_dev -c -o dn_dev.o dn_dev.c
gcc -D__KERNEL__ -I/usr/local/src/linux-2.4.28/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/local/src/linux-2.4.28/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=dn_neigh -c -o dn_neigh.o dn_neigh.c
dn_neigh.c:584: `THIS_MODULE' undeclared here (not in a function)
dn_neigh.c:584: initializer element is not constant
dn_neigh.c:584: (near initialization for `dn_neigh_seq_fops.owner')
make[2]: *** [dn_neigh.o] Error 1
make[2]: Leaving directory `/usr/local/src/linux-2.4.28/net/decnet'
make[1]: *** [_modsubdir_decnet] Error 2
make[1]: Leaving directory `/usr/local/src/linux-2.4.28/net'
make: *** [_mod_net] Error 2
이렇게 마지막 에러가 나더군요;;;
도..도..도와주세요..쿨럭;;
2번째 다시 까는데..똑같은 에러가 나서..이렇게 질문을 올립니다;;
헤더 추가해주세요..
cd /usr/local/src/linux-2.4.28/net/decnet
vi dn_neigh.c
add :
#include <linux/module.h>
이렇게 하니까 제대로 되네요..^^
ref : http://marc.theaimsgroup.com/?l=linux-kernel&m=110097835217532&w=2
댓글 달기