1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
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 */
|