rocksdb/env
Andrew Kryczka 20dd828c01 Avoid clock_gettime on pre-10.12 macOS versions (#5570)
Summary:
On older macOS like 10.10 we saw the following compiler error:

```
/go/src/github.com/cockroachdb/cockroach/c-deps/rocksdb/env/env_posix.cc:845:19:
error: use of undeclared identifier 'CLOCK_THREAD_CPUTIME_ID'
    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
                  ^
```

According to mac's `man clock_gettime`: "These functions first appeared in Mac
OSX 10.12". So we should not try to compile it on earlier versions.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5570

Test Plan:
verified it compiles now on 10.10. Also did some investigation to
ensure it does not cause regression on macOS 10.12+, although I do not
have access to such an environment to really test.

Differential Revision: D17322629

Pulled By: riversand963

fbshipit-source-id: e0a412223854f826b4d83e6d15c3739ff4620d7d
2019-09-11 14:07:25 -07:00
..
env_basic_test.cc The ObjectRegistry class replaces the Registrar and NewCustomObjects.… (#5293) 2019-07-23 17:13:05 -07:00
env_chroot.cc Apply modernize-use-override (3) 2019-02-19 13:39:49 -08:00
env_chroot.h Change RocksDB License 2017-07-15 16:11:23 -07:00
env_encryption.cc Fix EncryptedEnv assert (#5735) 2019-09-05 17:21:42 -07:00
env_hdfs.cc Fix compilation with USE_HDFS (#5444) 2019-06-18 14:55:59 -07:00
env_posix.cc Avoid clock_gettime on pre-10.12 macOS versions (#5570) 2019-09-11 14:07:25 -07:00
env_test.cc Fix build errors regarding const qualifier being ignored on cast result type (#5432) 2019-06-07 19:37:41 -07:00
env.cc The ObjectRegistry class replaces the Registrar and NewCustomObjects.… (#5293) 2019-07-23 17:13:05 -07:00
io_posix.cc Fixed FALLOC_FL_KEEP_SIZE undefined (#5614) 2019-09-05 17:37:21 -07:00
io_posix.h Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
mock_env_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
mock_env.cc Apply modernize-use-override (3) 2019-02-19 13:39:49 -08:00
mock_env.h Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00