summaryrefslogtreecommitdiff
path: root/patches/source/slocate/slocate.bigfile.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/slocate/slocate.bigfile.diff')
-rw-r--r--patches/source/slocate/slocate.bigfile.diff33
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/source/slocate/slocate.bigfile.diff b/patches/source/slocate/slocate.bigfile.diff
new file mode 100644
index 00000000..6ccd1202
--- /dev/null
+++ b/patches/source/slocate/slocate.bigfile.diff
@@ -0,0 +1,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)) {