mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::db: ABI fixes for RocksDB v6.19+.
This commit is contained in:
parent
7cd34cba0a
commit
6ea6a003dc
2 changed files with 14 additions and 3 deletions
11
ircd/db.cc
11
ircd/db.cc
|
@ -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
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue