[Kernel] error: ‘PATH_MAX’ undeclared (first use in this function)
如標題所說,今天在嘗試 Build Kernel 時發現了這個問題:
這時只需要:
查看最上面的宣告中是否有 include limits.h ,若沒有,則加入一行:
--
做個筆記
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[4]: *** [scripts/mod/sumversion.o] Error 1 make[3]: *** [scripts/mod] Error 2 make[2]: *** [scripts] Error 2 make[2]: Leaving directory `/home/steven_wu/dsr1000n/linux/kernel_2.6/linux' make[1]: *** [linux] Error 2 make[1]: Leaving directory `/home/steven_wu/dsr1000n/linux/kernel_2.6' make: *** [kernel] Error 2
這時只需要:
vim scripts/mod/sumversion.c
查看最上面的宣告中是否有 include limits.h ,若沒有,則加入一行:
#include <limits.h>
--
做個筆記
留言
張貼留言