Bug 563382 - Define PATH_MAX if not available
authorColin Walters <walters@verbum.org>
Fri, 13 Feb 2009 20:10:21 +0000 (15:10 -0500)
committerColin Walters <walters@verbum.org>
Thu, 19 Feb 2009 15:41:19 +0000 (10:41 -0500)
This fixes the build on Hurd.  If anyone ever actually uses Hurd with
filenames longer than 4096, they can open a new bug.

giscanner/grealpath.h

index 82d482a..f5af7cb 100644 (file)
@@ -13,6 +13,9 @@ static inline gchar*
 g_realpath (const char *path)
 {
 #ifndef _WIN32
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
        char buffer [PATH_MAX];
        if (realpath(path, buffer))
                return g_strdup(buffer);