error: ‘PATH_MAX’ undeclared (first use in this function)

Ubuntu下 make menuconfig使用必须安装一个库

apt-get install libncurses5-dev

否则提示错误。

>> Unable to find the Ncurseslibraries. 
>> 
>> You must install ncurses-devel inorder 
>> to use 'make menuconfig' 

make[2]: *** [scripts/lxdialog/ncurses] 错误1 
make[1]: *** [menuconfig] 错误 2 
make: *** [menuconfig] 错误 2 

Ubuntu 11.10环境下,编译PowerPC系统内核出错

内核2.6.19交叉编译问题,描述如下:

scripts/mod/sumversion.c: In function‘get_src_version’: 
scripts/mod/sumversion.c:384: error: ‘PATH_MAX’ undeclared (firstuse 
in this function) 
scripts/mod/sumversion.c:384: error: (Each undeclared identifieris 
reported only once 
scripts/mod/sumversion.c:384: error: for each function it appearsin.) 
scripts/mod/sumversion.c:384: warning: unused variable‘filelist’ 
make[3]: *** [scripts/mod/sumversion.o] Error1 
make[2]: *** [scripts/mod] Error 2 
make[1]: *** [scripts] Error 2 
make[1]: Leaving directory`/home/nios2/uClinux-dist/linux-2.6.x' 
make: *** [linux] Error 1

 

解决方法:

# vi scripts/mod/sumversion.c

头文件包含中查看是否有limits.h,若没有,包含进去即可

#inlcude

你可能感兴趣的:(error: ‘PATH_MAX’ undeclared (first use in this function))