summaryrefslogtreecommitdiffstats
path: root/patches/source/slocate/slocate.bigfile.diff
blob: 6ccd1202eef8204729491bb0074c732fc73903e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Fix 2GB limitation - brought to you by mancha

--- src/utils.c.orig		2012-08-25
+++ src/utils.c			2012-08-25
@@ -284,12 +284,12 @@ int
 verify_slocate_db(struct g_data_s *g_data, char *file)
 {
 	char ch[1];
-	struct stat tf_stat;
+	struct stat64 tf_stat;
 	int bytes = 0;
 	int fd = -1;
 	
 	if (access(file, W_OK | R_OK) == 0) {
-		if (lstat(file, &tf_stat) == -1) {
+		if (lstat64(file, &tf_stat) == -1) {
 			if (!report_error(g_data, FATAL, "get_temp_file: fstat(): %s: %s\n", file, strerror(errno)))
 			    goto EXIT;
 			
@@ -522,11 +522,11 @@ EXIT:
  * to check them separately */
 int verify_access(const char *path)
 {
-	struct stat path_stat;
+	struct stat64 path_stat;
 	int ret = 0;
 	char *ptr = NULL;
 
-	if (lstat(path, &path_stat) == -1)
+	if (lstat64(path, &path_stat) == -1)
 	    goto EXIT;
 
 	if (!S_ISLNK(path_stat.st_mode)) {