Fix buid on Mac OS X
This commit is contained in:
parent
ffc2fe8eef
commit
7267bb5be4
@ -2,11 +2,11 @@
|
|||||||
#ifndef MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H
|
#ifndef MESSMER_CPPUTILS_SYSTEM_CLOCKGETTIME_H
|
||||||
#define 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
|
// 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.
|
// 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 <sys/time.h>
|
#include <sys/time.h>
|
||||||
#define CLOCK_REALTIME 0
|
#define CLOCK_REALTIME 0
|
||||||
inline int clock_gettime(int /*clk_id*/, struct timespec *result) {
|
inline int clock_gettime(int /*clk_id*/, struct timespec *result) {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <blockstore/utils/Key.h>
|
#include <blockstore/utils/Key.h>
|
||||||
#include <fspp/fs_interface/Dir.h>
|
#include <fspp/fs_interface/Dir.h>
|
||||||
#include <cpp-utils/system/time.h>
|
#include <cpp-utils/system/time.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
// TODO Implement (and test) atime, noatime, strictatime, relatime mount options
|
// TODO Implement (and test) atime, noatime, strictatime, relatime mount options
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user