From ef273a08d3319f6830b71427467f7d16b28cdb1a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 6 Sep 2009 11:09:41 +0200 Subject: [PATCH] Commit Mac pathlen patch --- bacula/patches/3.0.2-mac-path-len.patch | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 bacula/patches/3.0.2-mac-path-len.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 */ -- 2.39.5