Bug #16574 Patch to compile on GNU/Hurd (PATH_MAX limit not existing)
Submitted: 17 Jan 2006 18:38 Modified: 19 Sep 2006 16:39
Reporter: Christian Hammers (Silver Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0 OS:GNU/Hurd
Assigned to: Magnus Blåudd CPU Architecture:Any

[17 Jan 2006 18:38] Christian Hammers
Attached you will find a patch from Michael Banck <mbanck@debian.org> that
lets MySQL build on GNU/Hurd. His comments:

" There are some occurances of PATH_MAX in the code which are used
  unconditionally.  As there is no system limit on path names on GNU,
  PATH_MAX is not defined.  A work-around is to define PATH_MAX in the
  source to some arbitrary value. "



How to repeat:
Build it on Hurd.

Suggested fix:
will be attached via file upload
[17 Jan 2006 18:39] Christian Hammers

Attachment: 86_PATH_MAX.dpatch (application/octet-stream, text), 2.64 KiB.

[17 Jan 2006 18:59] Christian Hammers
[28 Jan 2006 2:44] Jorge del Conde
Thanks for the patch.  I will mark this bug report as a feature request.
[21 Jul 2006 18:18] Christian Hammers
Update, add this to the end of the patch:

--- old/ndb/include/util/File.hpp
+++ old/ndb/include/util/File.hpp
@@ -19,6 +19,10 @@

 #include <ndb_global.h>

+#ifndef PATH_MAX
+#define PATH_MAX 4096
  * This class provides a file abstraction . It has operations
  * to create, read, write and delete a file.
--- old/ndb/src/common/portlib/NdbConfig.c
+++ old/ndb/src/common/portlib/NdbConfig.c
@@ -20,6 +20,10 @@
 #include <NdbMem.h>
 #include <basestring_vsnprintf.h>

+#ifndef PATH_MAX
+#define PATH_MAX 4096
 static const char *datadir_path= 0;

 const char *
[26 Jul 2006 13:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[15 Sep 2006 15:28] Magnus Blåudd
Pushed to 5.0-maint and 5.1-maint
[15 Sep 2006 22:21] Chad MILLER
Available in 5.1.12-beta.
[19 Sep 2006 16:39] Paul DuBois
No changelog entry needed.