Fix compiler error on Mac OS X
This commit is contained in:
parent
079d73a0ea
commit
2b9469cd20
@ -124,9 +124,15 @@ void DirBlob::statChild(const Key &key, struct ::stat *result) const {
|
||||
result->st_gid = child.gid;
|
||||
//TODO If possible without performance loss, then for a directory, st_nlink should return number of dir entries (including "." and "..")
|
||||
result->st_nlink = 1;
|
||||
#ifdef __APPLE__
|
||||
result->st_atimespec = child.lastAccessTime;
|
||||
result->st_mtimespec = child.lastModificationTime;
|
||||
result->st_ctimespec = child.lastMetadataChangeTime;
|
||||
#else
|
||||
result->st_atim = child.lastAccessTime;
|
||||
result->st_mtim = child.lastModificationTime;
|
||||
result->st_ctim = child.lastMetadataChangeTime;
|
||||
#endif
|
||||
result->st_size = _getLstatSize(key);
|
||||
//TODO Move ceilDivision to general utils which can be used by cryfs as well
|
||||
result->st_blocks = blobstore::onblocks::utils::ceilDivision(result->st_size, (off_t)512);
|
||||
|
Loading…
x
Reference in New Issue
Block a user