]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/3.0.2-mac-path-len.patch
Drop old bdb catalog scripts
[bacula/bacula] / bacula / patches / 3.0.2-mac-path-len.patch
1  This patch can be applied to version 3.0.2 and fixes
2  bug #1368 ASSERT Failure on MacOS. Unfortunately,
3  MacOS programmers do not respect/implement POSIX
4  pathconf().
5
6  Apply it to version 3.0.2 with:
7
8  cd <bacula-source>
9  patch -p2 <3.0.2-mac-path-len.patch
10  ./configure <your-options>
11  make
12  ...
13  make install
14
15
16
17 diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c
18 index ac9e4ce..81e887a 100644
19 --- a/bacula/src/findlib/find.c
20 +++ b/bacula/src/findlib/find.c
21 @@ -67,13 +67,13 @@ FF_PKT *init_find_files()
22  
23     /* Get system path and filename maximum lengths */
24     path_max = pathconf(".", _PC_PATH_MAX);
25 -   if (path_max < 1024) {
26 -      path_max = 1024;
27 +   if (path_max < 2048) {
28 +      path_max = 2048;
29     }
30  
31     name_max = pathconf(".", _PC_NAME_MAX);
32 -   if (name_max < 1024) {
33 -      name_max = 1024;
34 +   if (name_max < 2048) {
35 +      name_max = 2048;
36     }
37     path_max++;                        /* add for EOS */
38     name_max++;                        /* add for EOS */