mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::db: Add workaround for unconditional crc32'ing within rocksdb.
This commit is contained in:
parent
4af83b83c4
commit
6fec0b3e10
2 changed files with 30 additions and 0 deletions
|
@ -144,6 +144,7 @@ if LINUX
|
|||
libircd_la_SOURCES += mods_ldso.cc
|
||||
endif
|
||||
libircd_la_SOURCES += db_write_thread.cc
|
||||
libircd_la_SOURCES += db_crc32.cc
|
||||
libircd_la_SOURCES += db_port.cc
|
||||
libircd_la_SOURCES += db_env.cc
|
||||
libircd_la_SOURCES += db.cc
|
||||
|
@ -175,6 +176,9 @@ db_port.lo: AM_CPPFLAGS := ${ROCKSDB_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
|||
db_write_thread.lo: AM_CPPFLAGS := ${ROCKSDB_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
db_write_thread.lo: AM_CPPFLAGS += -I$(top_srcdir)/deps/rocksdb/include
|
||||
db_write_thread.lo: AM_CPPFLAGS += -I$(top_srcdir)/deps/rocksdb
|
||||
db_crc32.lo: AM_CPPFLAGS := ${ROCKSDB_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
db_crc32.lo: AM_CPPFLAGS += -I$(top_srcdir)/deps/rocksdb/include
|
||||
db_crc32.lo: AM_CPPFLAGS += -I$(top_srcdir)/deps/rocksdb
|
||||
fmt.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
fmt.lo: AM_CXXFLAGS := ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
|
||||
fs.lo: AM_CPPFLAGS := ${ASIO_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
|
|
26
ircd/db_crc32.cc
Normal file
26
ircd/db_crc32.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Matrix Construct
|
||||
//
|
||||
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||
// Copyright (C) 2016-2019 Jason Volk <jason@zemos.net>
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice is present in all copies. The
|
||||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#if __has_include("table/block_fetcher.h")
|
||||
#define ROCKSDB_PLATFORM_POSIX
|
||||
#define ZSTD_VERSION_NUMBER 0
|
||||
#include "table/block_fetcher.h"
|
||||
//#define IRCD_DB_BYPASS_CHECKSUM
|
||||
#else
|
||||
#warning "The RocksDB source code is not available. Cannot interpose bugfixes for db/.h."
|
||||
#endif
|
||||
|
||||
#if defined(IRCD_DB_BYPASS_CHECKSUM)
|
||||
void
|
||||
rocksdb::BlockFetcher::CheckBlockChecksum()
|
||||
{
|
||||
//assert(0);
|
||||
}
|
||||
#endif
|
Loading…
Reference in a new issue