Bug 17561

Summary: scripts/mod/sumversion.c:384: error: 'PATH_MAX' undeclared
Product: Other Reporter: Martin Mokrejs (mmokrejs)
Component: ConfigurationAssignee: other_configuration (other_configuration)
Status: RESOLVED WILL_NOT_FIX    
Severity: normal CC: akpm, alan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.19.7 Subsystem:
Regression: No Bisected commit-id:

Description Martin Mokrejs 2010-08-31 18:39:38 UTC
I need to compile some older linux kernel, and with 2.6.17 and 2.6.19.7 I had the following issue. I found it was known two years ago and here is the patch. Please fix the older kernel releases, at least in svn, maybe.

  HOSTCC  scripts/mod/sumversion.o
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] Error 1


Fixes:
http://bugs.gentoo.org/226169
http://article.gmane.org/gmane.comp.emulators.xen.devel/51901

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.
Comment 1 Andrew Morton 2010-09-17 21:27:19 UTC
That file now includes <limits.h> so I'll assume the bug has been fixed.
Comment 2 Martin Mokrejs 2010-09-24 12:51:43 UTC
But would it be possible to release updates of the 2.6.17 and 2.6.19 branches?
In 2.6.20 there were some api changes and some drivers do not compile against them without code changes.

I see it is fixed in 2.6.23 while I haven't inspected .2[0-2].
Comment 3 Martin Mokrejs 2010-10-24 22:15:16 UTC
To summarize, I have this problem with 2.6.17, 2.6.18.8, 2.6.19.7, 2.6.20.21. I still haven't tried neither 2.6.20.x not 2.6.21.x series.