]> git.sur5r.net Git - bacula/bacula/commitdiff
Commit Mac pathlen patch
authorKern Sibbald <kern@sibbald.com>
Sun, 6 Sep 2009 09:09:41 +0000 (11:09 +0200)
committerKern Sibbald <kern@sibbald.com>
Sun, 6 Sep 2009 09:09:41 +0000 (11:09 +0200)
bacula/patches/3.0.2-mac-path-len.patch [new file with mode: 0644]

diff --git a/bacula/patches/3.0.2-mac-path-len.patch b/bacula/patches/3.0.2-mac-path-len.patch
new file mode 100644 (file)
index 0000000..1755ad6
--- /dev/null
@@ -0,0 +1,38 @@
+ This patch can be applied to version 3.0.2 and fixes
+ bug #1368 ASSERT Failure on MacOS. Unfortunately,
+ MacOS programmers do not respect/implement POSIX
+ pathconf().
+
+ Apply it to version 3.0.2 with:
+
+ cd <bacula-source>
+ patch -p2 <3.0.2-mac-path-len.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+
+diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c
+index ac9e4ce..81e887a 100644
+--- a/bacula/src/findlib/find.c
++++ b/bacula/src/findlib/find.c
+@@ -67,13 +67,13 @@ FF_PKT *init_find_files()
+    /* Get system path and filename maximum lengths */
+    path_max = pathconf(".", _PC_PATH_MAX);
+-   if (path_max < 1024) {
+-      path_max = 1024;
++   if (path_max < 2048) {
++      path_max = 2048;
+    }
+    name_max = pathconf(".", _PC_NAME_MAX);
+-   if (name_max < 1024) {
+-      name_max = 1024;
++   if (name_max < 2048) {
++      name_max = 2048;
+    }
+    path_max++;                        /* add for EOS */
+    name_max++;                        /* add for EOS */