source: trunk/dports/sysutils/slocate/files/patch-main.c @ 13382

Last change on this file since 13382 was 13382, checked in by pguyot (Paul Guyot), 14 years ago

slocate update was broken on Tiger.

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1--- main.c.orig 2005-06-20 15:29:38.000000000 +0900
2+++ main.c      2005-06-20 15:30:16.000000000 +0900
3@@ -125,23 +125,11 @@
4 char **SLOCATE_PATH = NULL;
5 
6 /* More fitting paths for FreeBSD -matt */
7-#if defined(__FreeBSD__)
8-char *SLOCATEDB = "/var/db/slocate/slocate.db";
9-char *TMPSLOCATEDB = "/var/db/slocate/slocate.db.tmp";
10-char *SLOCATEDB_DIR = "/var/db/slocate/";
11-#elif defined(__SunOS__)
12-char *SLOCATEDB = "/var/db/slocate/slocate.db";
13-char *TMPSLOCATEDB = "/var/db/slocate/slocate.db.tmp";
14-char *SLOCATEDB_DIR = "/var/db/slocate/";
15-#undef MTAB_FILE
16-#define MTAB_FILE "/etc/mnttab"
17-#else
18-char *SLOCATEDB = "/var/lib/slocate/slocate.db";
19-char *TMPSLOCATEDB = "/var/lib/slocate/slocate.db.tmp";
20-char *SLOCATEDB_DIR = "/var/lib/slocate/";
21-#endif
22+char *SLOCATEDB = "__PREFIX__/var/db/slocate/slocate.db";
23+char *TMPSLOCATEDB = "__PREFIX__/var/db/slocate/slocate.db.tmp";
24+char *SLOCATEDB_DIR = "__PREFIX__/var/db/slocate/";
25 
26-# define UPDATEDB_CONF "/etc/updatedb.conf"
27+# define UPDATEDB_CONF "__PREFIX__/etc/updatedb.conf"
28 char *EXCLUDE_DIR=NULL;
29 int EXCLUDE=0;
30 int VERBOSE=0;
31@@ -1031,7 +1019,7 @@
32        *dirchk = dirstr;
33        dirchk[1] = NULL;
34       
35-       dir = fts_open(dirchk,FTS_PHYSICAL,NULL);
36+       dir = fts_open(dirchk,FTS_PHYSICAL|FTS_NOCHDIR,NULL);
37       
38        /* If fts_open failes, report and exit */
39        if (!dir)
Note: See TracBrowser for help on using the repository browser.