diff options
author | Willem Jan Withagen <wjw@digiware.nl> | 2016-05-17 12:01:31 +0200 |
---|---|---|
committer | Willem Jan Withagen <wjw@digiware.nl> | 2016-05-25 12:12:43 +0200 |
commit | 62be9268de5e9c9a08bdb977a7dab1ab9c55b2be (patch) | |
tree | b29cdbd79e8495196b1be7e57115630a1f2a1c38 /src/test/system | |
parent | RWLock.h: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP not available (diff) | |
download | ceph-62be9268de5e9c9a08bdb977a7dab1ab9c55b2be.tar.xz ceph-62be9268de5e9c9a08bdb977a7dab1ab9c55b2be.zip |
compat.h: added a set of extras for FreeBSD <> Linux compatability
If this file is used, it is wise to include it a fist include file
at the top of the code.
Things added to compat.h:
- ENODATA versus ENOATTR
This is a very tricky one since ENOATTR is also defined in boost,
but with a totally diferent value again. We need to make sure
that the same value is used alt all places.
- O_DSYNC(freeBSD) versus O_SYNC(Linux)
fortunately they have the same value.
- HOST_NAME_MAX is undefined in FreeBSD
So hardcoded to the value that Linux uses
- pthread_set_name_np(FreeBSD) versus pthread_setname_np(Linux)
and the NON-Posix code lives in a separate include file
- Some compatiblility code for CLOCK_MONOTONIC_COARSE to rewite
to the FreeBSD equivalent CLOCK_MONOTONIC_FAST
compat.h is added to:
* src/common/Thread.cc
* src/common/obj_bencher.cc
* src/crush/CrushLocation.cc
* src/include/compat.h
* src/include/rados/librados.h
* src/os/filestore/FileStore.cc
* src/test/system/systest_runnable.cc
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Diffstat (limited to 'src/test/system')
-rw-r--r-- | src/test/system/systest_runnable.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/system/systest_runnable.cc b/src/test/system/systest_runnable.cc index c7ed6aa72a2..95453391207 100644 --- a/src/test/system/systest_runnable.cc +++ b/src/test/system/systest_runnable.cc @@ -12,6 +12,7 @@ * */ +#include "include/compat.h" #include "common/errno.h" #include "include/atomic.h" #include "systest_runnable.h" @@ -31,10 +32,6 @@ #include <unistd.h> #include <vector> -#if defined(__FreeBSD__) -#include <pthread_np.h> -#endif - using std::ostringstream; using std::string; |