0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 05:29:00 +02:00

ircd::db: ABI fixes for RocksDB v6.19+.

This commit is contained in:
Jason Volk 2021-09-15 01:42:21 -07:00
parent 7cd34cba0a
commit 6ea6a003dc
2 changed files with 14 additions and 3 deletions

View file

@ -33,11 +33,11 @@ ircd::db::version_api
}
};
#ifndef IRCD_DB_HAS_VERSION_ABI
extern "C" const char *
rocksdb_build_git_sha;
extern "C" const char *
rocksdb_build_git_sha,
rocksdb_build_compile_date;
#endif
decltype(ircd::db::version_abi)
ircd::db::version_abi
@ -47,9 +47,14 @@ ircd::db::version_abi
{
fmt::sprintf
{
#ifdef IRCD_DB_HAS_VERSION_ABI
buf, "%s",
rocksdb::GetRocksVersionAsString(true),
#else
buf, "%s (%s)",
lstrip(rocksdb_build_git_sha, "rocksdb_build_git_sha:"),
rocksdb_build_compile_date,
#endif
};
}
};

View file

@ -73,6 +73,12 @@
#define IRCD_DB_HAS_MULTIGET_DIRECT
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 19) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 19 && ROCKSDB_PATCH >= 3)
#define IRCD_DB_HAS_VERSION_ABI
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 22) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 22 && ROCKSDB_PATCH >= 1)