diff --git a/src/cpp-utils/system/clock_gettime.h b/src/cpp-utils/system/clock_gettime.h index 7c7d9765..42ce5775 100644 --- a/src/cpp-utils/system/clock_gettime.h +++ b/src/cpp-utils/system/clock_gettime.h @@ -2,11 +2,11 @@ #ifndef MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H #define MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H -// Implements clock_gettime for Mac OS X (where it is not implemented by in the standard library) +// Implements clock_gettime for Mac OS X before 10.12 (where it is not implemented by in the standard library) // Source: http://stackoverflow.com/a/9781275/829568 // Caution: The returned value is less precise than the returned value from a linux clock_gettime would be. -#ifdef __MACH__ +#if defined(__MACH__) && !defined(CLOCK_REALTIME) #include #define CLOCK_REALTIME 0 inline int clock_gettime(int /*clk_id*/, struct timespec *result) { diff --git a/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h b/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h index 2ff8b617..16a000a1 100644 --- a/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h +++ b/src/cryfs/filesystem/fsblobstore/utils/DirEntry.h @@ -5,6 +5,7 @@ #include #include #include +#include // TODO Implement (and test) atime, noatime, strictatime, relatime mount options