From: Kern Sibbald Date: Sun, 6 Sep 2009 09:09:41 +0000 (+0200) Subject: Commit Mac pathlen patch X-Git-Tag: Release-7.0.0~2635^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ef273a08d3319f6830b71427467f7d16b28cdb1a;p=bacula%2Fbacula Commit Mac pathlen patch --- 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 index 0000000000..1755ad67bb --- /dev/null +++ b/bacula/patches/3.0.2-mac-path-len.patch @@ -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 + patch -p2 <3.0.2-mac-path-len.patch + ./configure + 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 */