Merge pull request #18888 from tchaikov/wip-osx

common,test,cmake: various changes to re-enable build on osx

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Kefu Chai 2017-11-14 15:02:33 +08:00 committed by GitHub
commit 75baa10d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 2 deletions

View File

@ -23,7 +23,11 @@
#include <dlfcn.h>
#define PLUGIN_PREFIX "libceph_"
#ifdef __APPLE__
#define PLUGIN_SUFFIX ".dylib"
#else
#define PLUGIN_SUFFIX ".so"
#endif
#define PLUGIN_INIT_FUNCTION "__ceph_plugin_init"
#define PLUGIN_VERSION_FUNCTION "__ceph_plugin_version"

View File

@ -15,6 +15,9 @@
#include <sys/stat.h>
#include <dirent.h>
#include "include/uuid.h"
#include "blkdev.h"
using namespace std;
#ifdef __linux__
#include <linux/fs.h>

View File

@ -6,6 +6,8 @@ set(snappy_sources
add_library(ceph_snappy SHARED ${snappy_sources})
add_dependencies(ceph_snappy ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_include_directories(ceph_snappy SYSTEM PRIVATE
"${SNAPPY_INCLUDE_DIR}")
target_link_libraries(ceph_snappy ${SNAPPY_LIBRARIES})
set_target_properties(ceph_snappy PROPERTIES
VERSION 2.0.0

View File

@ -386,7 +386,7 @@ TEST(CompressionPlugin, all)
CompressionPlugin *factory = dynamic_cast<CompressionPlugin*>(reg->get_with_load("compressor", "invalid"));
EXPECT_FALSE(factory);
factory = dynamic_cast<CompressionPlugin*>(reg->get_with_load("compressor", "example"));
EXPECT_TRUE(factory);
ASSERT_TRUE(factory);
stringstream ss;
EXPECT_EQ(0, factory->factory(&compressor, &ss));
EXPECT_TRUE(compressor.get());

View File

@ -549,7 +549,7 @@ public:
int read_percent;
int num_objs;
size_t min_obj_len;
uint64_t max_obj_len;
size_t max_obj_len;
size_t min_op_len;
size_t max_op_len;
size_t max_ops;