Description: Define MAXPATHLEN if necessary (not defined on Hurd)
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 20111-07-17
Forwarded: no

Index: libsx-2.08/src/dirlist.c
===================================================================
--- libsx-2.08.orig/src/dirlist.c
+++ libsx-2.08/src/dirlist.c
@@ -36,6 +36,10 @@
 #define MAXPATHLEN 1024
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
 #ifndef strdup
 extern char *strdup(const char *str);
 #endif
Index: libsx-2.08/freq/dirlist.c
===================================================================
--- libsx-2.08.orig/freq/dirlist.c
+++ libsx-2.08/freq/dirlist.c
@@ -48,6 +48,9 @@ void free_table(char **table, int n)
   free(orig);
 }
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
 
 void free_dirlist(char **table)
 {
Index: libsx-2.08/freq/freq.c
===================================================================
--- libsx-2.08.orig/freq/freq.c
+++ libsx-2.08/freq/freq.c
@@ -19,6 +19,10 @@
 
 #include "libsx.h"
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
 #ifndef CLK_TCK
 #include <unistd.h>
 #define  CLK_TCK  sysconf(_SC_CLK_TCK)    /* seems to work right */
