Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Apr 9, 2024
1 parent 93a0f4e commit b632ff2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nix/rocksdb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,20 @@ stdenv.mkDerivation (finalAttrs: {
# otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]"
hardeningDisable = lib.optional stdenv.hostPlatform.isWindows "format";

postPatch = lib.optionalString (lib.versionOlder finalAttrs.version "8") ''
postPatch = lib.optionalString (lib.versionOlder finalAttrs.version "9") ''
# Fix gcc-13 build failures due to missing <cstdint> and
# <system_error> includes, fixed upstyream sice 8.x
# <system_error> includes, fixed upstream since 9.x
sed -e '1i #include <cstdint>' -i options/offpeak_time_info.h
'' + lib.optionalString (lib.versionOlder finalAttrs.version "8") ''
# Fix gcc-13 build failures due to missing <cstdint> and
# <system_error> includes, fixed upstream since 8.x
sed -e '1i #include <cstdint>' -i db/compaction/compaction_iteration_stats.h
sed -e '1i #include <cstdint>' -i table/block_based/data_block_hash_index.h
sed -e '1i #include <cstdint>' -i util/string_util.h
sed -e '1i #include <cstdint>' -i include/rocksdb/utilities/checkpoint.h
'' + lib.optionalString (lib.versionOlder finalAttrs.version "7") ''
# Fix gcc-13 build failures due to missing <cstdint> and
# <system_error> includes, fixed upstyream sice 7.x
# <system_error> includes, fixed upstream since 7.x
sed -e '1i #include <system_error>' -i third-party/folly/folly/synchronization/detail/ProxyLockable-inl.h
'' + ''
# fixed in https://github.com/facebook/rocksdb/pull/12309
Expand Down

0 comments on commit b632ff2

Please sign in to comment.