summaryrefslogtreecommitdiff
path: root/chat/icb/patches/patch-aq
diff options
context:
space:
mode:
Diffstat (limited to 'chat/icb/patches/patch-aq')
-rw-r--r--chat/icb/patches/patch-aq35
1 files changed, 35 insertions, 0 deletions
diff --git a/chat/icb/patches/patch-aq b/chat/icb/patches/patch-aq
new file mode 100644
index 00000000000..40542b77ec8
--- /dev/null
+++ b/chat/icb/patches/patch-aq
@@ -0,0 +1,35 @@
+$NetBSD: patch-aq,v 1.1.1.1 2000/12/15 00:36:39 wiz Exp $
+
+diff -x *.orig -urN ./tcl/tclGlob.c /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/tclGlob.c
+--- ./tcl/tclGlob.c Fri Feb 24 22:19:55 1995
++++ /usr/pkgsrc/net/icb/work.i386.unpatched/icb-5.0.9/tcl/tclGlob.c Fri Nov 26 22:56:30 1999
+@@ -28,6 +28,12 @@
+ #include <sys/stat.h>
+ #include <tcl.h>
+
++#ifdef __linux__
++#define DIRNAMLEN(d) strlen((d)->d_name)
++#else
++#define DIRNAMLEN(d) ((d)->d_namlen)
++#endif
++
+ /*
+ * The structure below is used to keep track of a globbing result
+ * being built up (i.e. a partial list of file names). The list
+@@ -298,12 +304,12 @@
+ if (Tcl_StringMatch(entryPtr->d_name, pattern)) {
+ if (*p == 0) {
+ AppendResult(dir, entryPtr->d_name,
+- (int) entryPtr->d_namlen, resPtr);
++ (int) DIRNAMLEN(entryPtr), resPtr);
+ } else {
+- if ((l1+entryPtr->d_namlen+2) <= STATIC_SIZE) {
++ if ((l1+DIRNAMLEN(entryPtr)+2) <= STATIC_SIZE) {
+ newDir = static1;
+ } else {
+- newDir = malloc((unsigned) (l1+entryPtr->d_namlen+2));
++ newDir = malloc((unsigned) (l1+DIRNAMLEN(entryPtr)+2));
+ }
+ sprintf(newDir, "%s%s/", dir, entryPtr->d_name);
+ result = DoGlob(interp, newDir, p+1, resPtr);
+