We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25fe57f commit 151bd4aCopy full SHA for 151bd4a
src/fs_inode.hpp
@@ -34,12 +34,16 @@ namespace fs
34
void
35
recompute(struct stat &st)
36
{
37
- /*
38
- Some OSes have 32-bit device IDs, so box this up first.
39
- This does also presume a 64-bit inode value.
40
- */
41
- uint64_t st_dev = (uint64_t)st.st_dev;
42
- st.st_ino |= (st_dev << 32);
+ switch(sizeof(st.st_ino))
+ {
+ case 4:
+ st.st_ino |= ((uint32_t)st.st_dev << 16);
+ break;
+ case 8:
43
+ default:
44
+ st.st_ino |= ((uint64_t)st.st_dev << 32);
45
46
+ }
47
}
48
49
0 commit comments