summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-12-01 01:31:51 +0000
committerChris Wilson <chris+github@qwirx.com>2008-12-01 01:31:51 +0000
commit53ebf1afe9f796d56af20040bde0893e46ad1b73 (patch)
treed9584963c3120c004dd966b2baf5e6254274659a /lib
parent302cb4a51ed03884279f5013805f32ba21da1243 (diff)
Fix the use of an unreasonably short type as the temporary storage
for inode numbers on Windows, resulting in all inode numbers being coerced into 2^16 space and many duplicates on systems with large numbers of files being backed up, possibly resulting in store corruption due to unwanted file rename operations.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/BoxPlatform.h4
-rw-r--r--lib/win32/emu.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index 01bdbcf1..269ca85f 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -38,6 +38,10 @@
// must define this before importing <sys/types.h>
#define __MSVCRT_VERSION__ 0x0601
#endif
+
+ // stop sys/types.h from defining its own ino_t as short,
+ // because we want a bigger one :)
+ #define _INO_T_
#endif
#ifdef HAVE_SYS_TYPES_H
diff --git a/lib/win32/emu.h b/lib/win32/emu.h
index e8d87f19..1d3fd150 100644
--- a/lib/win32/emu.h
+++ b/lib/win32/emu.h
@@ -25,6 +25,9 @@
#ifdef __MINGW32__
typedef uint32_t u_int32_t;
+ typedef uint64_t _ino_t;
+ typedef _ino_t ino_t;
+ #define _INO_T_
#else
typedef unsigned int mode_t;
typedef unsigned int pid_t;