GNOME Bugzilla – Bug 601497
FTBFS on the Hurd: PATH_MAX undefined
Last modified: 2018-05-04 10:12:10 UTC
[ From http://bugs.debian.org/555055 ] gvfs currently FTBFS on hurd-i386 because of unconditional use of PATH_MAX. The attached patch fixes it by just using glibc's ability to allocate just what is required. It also actually fixes a bug for the case when a symlink in /dev doesn't exist.
Created attachment 147453 [details] [review] Fix the build on the Hurd Patch from Samuel Thibault <sthibault@debian.org> to fix the build on the GNU/Hurd and fix a bug in the error checking of realpath()
*** Bug 647667 has been marked as a duplicate of this bug. ***
Created attachment 185880 [details] [review] Updated patch that applies on top of 1.8.0 Please consider applying this updated patch, note that it's not only hurd support that is achieved but there's also a bug fix because a test was inverted.
Note that you can drop the #ifdef (and what's in the #else/#endif) if you assume/require POSIX.1-2008 compatibility.
Looking at the #ifdef __GLIBC__ tests, I wonder how does gvfs come along with other variants of standard C library.
I'm commiting the bugfix, but I don't like the __GLIBC__ check. We should be doing some form of autoconf check with a HAVE_DYNAMIC_REALPATH result, rather than hardcoding ifdefs for a particular library version (and its probably not even right, ancient glibc may not have that features).
Maybe close this and file a new bug for the autoconf check if the bugfix has gone in?
This is an old bug and PATH_MAX is not currently used in the code, let's close as obsolete.