当我尝试在我的x86_64机器中编译linux内核2.6.19时,会发生以下错误,如何处理此错误。
scripts/mod/sumversion.c: In function 'get_src_version':
scripts/mod/sumversion.c:384:16: error: 'PATH_MAX' undeclared (first use in this function)
char filelist[PATH_MAX + 1];
^
scripts/mod/sumversion.c:384:16: note: each undeclared identifier is reported only once for each function it appears in
scripts/mod/sumversion.c:384:7: warning: unused variable 'filelist' [-Wunused-variable]
char filelist[PATH_MAX + 1];
^
scripts/Makefile.host:134: recipe for target 'scripts/mod/sumversion.o' failed
make[2]: *** [scripts/mod/sumversion.o] Error 1
scripts/Makefile.build:324: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:432: recipe for target 'scripts' failed
make: *** [scripts] Error 2
答案 0 :(得分:0)
可能这是已知bug的结果,其目标正是您使用的版本(以及其他一些版本):
总结一下,我在2.6.17,2.6.18.8,2.6.19.7,2.6.20.21中遇到了这个问题。
在给定的bug报告中尝试其他版本或应用补丁建议:
diff -r 557a4a0a5eac scripts/mod/sumversion.c
--- a/scripts/mod/sumversion.c Fri May 30 19:08:50 2008 +0100
+++ b/scripts/mod/sumversion.c Mon Jun 02 19:47:43 2008 +0900
@@ -8,6 +8,7 @@
#include <errno.h>
#include <string.h>
#include "modpost.h"
+#include <linux/limits.h>
/*
* Stolen form Cryptographic API.