리눅스에서 컴파일 및 모듈화 방법 문의드립니다.
작성자 정보
- 김밥2 작성
- 작성일
컨텐츠 정보
- 2,811 조회
- 0 추천
- 목록
본문
IGMP V3가 V2로 강제 변경되는 문제 때문에 고민중 외국인이 같은 문제로 올린글을 보고
(http://www.gossamer-threads.com/lists/linux/kernel/1273443)
/root/kernel/linux-3.0.4/net/ipv4/igmp.c
의 파일을 외국인이 하라는 대로 아래와 같이 고쳤습니다.
if (len == 8) { ===> if (len == 8 || IGMP_V2_SEEN(in_dev)) {
근데 제가 리눅스 초보라서 그 다음에 어떻게 해야하는 지를 모르겠습니다.
어떻게 컴파일을 하고 어떻게 커널 모듈에 심는지를 모르겠습니다.
cpp를 실행하면 다음과 같은 에러가 발생하고
[root@realneuron ipv4]# cpp igmp.c
# 1 "igmp.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "igmp.c"
igmp.c:73:26: fatal error: linux/module.h: No such file or directory
compilation terminated.
f (len == 8 || IGMP_V2_SEEN(in_dev))[root@realneuron ipv4]#
gcc를 실행하면 다음과 같은 에러가 발생합니다. ㅡ.ㅡ
[root@realneuron ipv4]# gcc igmp.c
igmp.c:1:8: error: expected ????before ??=??token
igmp.c:73:26: fatal error: linux/module.h: No such file or directory
compilation terminated.
도와주시면 감사하겠습니다.
관련자료
-
이전
-
다음