Index: Makefile --- Makefile.orig 2020-04-17 01:01:15.000000000 +0200 +++ Makefile 2020-04-29 22:30:40.208941000 +0200 @@ -218,15 +218,7 @@ $(foreach path, $(missing_make_config_paths), \ $(warning Warning: $(path) dont exist)) -ifeq ($(PLATFORM), OS_AIX) -# no debug info -else ifneq ($(PLATFORM), IOS) -CFLAGS += -g -CXXFLAGS += -g -else -# no debug info for IOS, that will make our library big OPT += -DNDEBUG -endif ifeq ($(PLATFORM), OS_AIX) ARFLAGS = -X64 rs @@ -347,9 +339,6 @@ WARNING_FLAGS += -Wno-unused-lambda-capture endif -ifndef DISABLE_WARNING_AS_ERROR - WARNING_FLAGS += -Werror -endif ifdef LUA_PATH @@ -750,7 +739,7 @@ blackbox_crash_test_with_txn whitebox_crash_test_with_txn -all: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(TESTS) +all: $(LIBRARY) all_but_some_tests: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(SUBSET) Index: env/env_posix.cc --- env/env_posix.cc.orig 2020-04-17 01:01:15.000000000 +0200 +++ env/env_posix.cc 2020-04-29 20:54:24.900276000 +0200 @@ -70,6 +70,11 @@ #include "util/thread_local.h" #include "util/threadpool_imp.h" +#if defined(OS_FREEBSD) || defined(__FreeBSD__) +#define fdatasync fsync +#define fread_unlocked fread +#endif + #if !defined(TMPFS_MAGIC) #define TMPFS_MAGIC 0x01021994 #endif Index: port/port_posix.h --- port/port_posix.h.orig 2020-04-17 01:01:15.000000000 +0200 +++ port/port_posix.h 2020-04-29 20:54:24.900569000 +0200 @@ -31,7 +31,7 @@ #define PLATFORM_IS_LITTLE_ENDIAN \ (__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN) #endif -#elif defined(OS_SOLARIS) +#elif defined(OS_SOLARIS) || defined(__sun) #include #ifdef _LITTLE_ENDIAN #define PLATFORM_IS_LITTLE_ENDIAN true @@ -45,7 +45,7 @@ #define PLATFORM_IS_LITTLE_ENDIAN (BYTE_ORDER == LITTLE_ENDIAN) #include #elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) || \ - defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) + defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) || defined(__FreeBSD__) #include #include #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN) Index: tools/ldb_cmd.cc --- tools/ldb_cmd.cc.orig 2020-04-17 01:01:15.000000000 +0200 +++ tools/ldb_cmd.cc 2020-04-29 20:54:24.901327000 +0200 @@ -548,8 +548,8 @@ option_map_.find(option); if (itr != option_map_.end()) { try { -#if defined(CYGWIN) - value = strtol(itr->second.c_str(), 0, 10); +#if 1 + value = (int)strtol(itr->second.c_str(), 0, 10); #else value = std::stoi(itr->second); #endif @@ -1560,8 +1560,8 @@ itr = options.find(ARG_MAX_KEYS); if (itr != options.end()) { try { -#if defined(CYGWIN) - max_keys_ = strtol(itr->second.c_str(), 0, 10); +#if 1 + max_keys_ = (int)strtol(itr->second.c_str(), 0, 10); #else max_keys_ = std::stoi(itr->second); #endif @@ -2512,8 +2512,8 @@ itr = options.find(ARG_MAX_KEYS); if (itr != options.end()) { try { -#if defined(CYGWIN) - max_keys_scanned_ = strtol(itr->second.c_str(), 0, 10); +#if 1 + max_keys_scanned_ = (int)strtol(itr->second.c_str(), 0, 10); #else max_keys_scanned_ = std::stoi(itr->second); #endif Index: util/string_util.cc --- util/string_util.cc.orig 2020-04-17 01:01:15.000000000 +0200 +++ util/string_util.cc 2020-04-29 20:54:24.901666000 +0200 @@ -296,7 +296,7 @@ uint64_t ParseUint64(const std::string& value) { size_t endchar; -#ifndef CYGWIN +#if 0 uint64_t num = std::stoull(value.c_str(), &endchar); #else char* endptr; @@ -346,11 +346,11 @@ int ParseInt(const std::string& value) { size_t endchar; -#ifndef CYGWIN +#if 0 int num = std::stoi(value.c_str(), &endchar); #else char* endptr; - int num = std::strtoul(value.c_str(), &endptr, 0); + int num = (int)std::strtoul(value.c_str(), &endptr, 0); endchar = endptr - value.c_str(); #endif @@ -368,7 +368,7 @@ } double ParseDouble(const std::string& value) { -#ifndef CYGWIN +#if 0 return std::stod(value); #else return std::strtod(value.c_str(), 0);