본문 바로가기

Linux

커널 컴파일시 PATH_MAX 관련 에러가 발생할때...

커널 컴파일 할 때 다음과 같은 에러가 발생했다.

scripts/mod/sumversion.c: In function 'get_src_version':
scripts/mod/sumversion.c:384: error: 'PATH_MAX' undeclared (first use in this function)
scripts/mod/sumversion.c:384: error: (Each undeclared identifier is reported only once
scripts/mod/sumversion.c:384: error: for each function it appears in.)
scripts/mod/sumversion.c:384: warning: unused variable 'filelist'
make[2]: *** [scripts/mod/sumversion.o] 오류 1
make[1]: *** [scripts/mod] 오류 2
make: *** [scripts] 오류 2


위는 PATH_MAX의 선언이 없는 경우에 발생한 에러이다.

해결책은 scripts/mod/sumversion.c 소스 코드에 #include <limits.h>로 추가해 주면 된다.

#include <string.h>
#include <limits.h>
#include "modpost.h"


limits.h를 추가해주어도 에러가 나면 아래와 같이 변경한다.

#include <linux/limits.h>




이제 컴파일이 잘 되겠지? ^.^




 

'Linux' 카테고리의 다른 글

'abort' was not declared in this scope  (0) 2009.08.10
SVN Editor 등록하기  (0) 2009.08.07
gcc 컴파일하기  (0) 2009.02.25
chmod 권한 설정하기  (0) 2008.12.23
동적 적재(DL) 라이브러리  (0) 2008.12.02