Skip to content

Add missing #include <cstdint> in string_util.h#880

Open
Chessing234 wants to merge 1 commit intocmu-db:masterfrom
Chessing234:fix/missing-cstdint-include
Open

Add missing #include <cstdint> in string_util.h#880
Chessing234 wants to merge 1 commit intocmu-db:masterfrom
Chessing234:fix/missing-cstdint-include

Conversation

@Chessing234
Copy link
Copy Markdown

Summary

  • Adds the missing #include <cstdint> to src/include/common/util/string_util.h
  • The header uses uint64_t (in FormatSize) without including <cstdint>, which causes build failures on systems where this type is not transitively included (e.g., Fedora 43 with GCC 15)

Details

On most platforms, uint64_t happens to be pulled in transitively through other standard headers, but this is not guaranteed by the C++ standard. Fedora 43 ships a newer GCC/libstdc++ that no longer transitively includes <cstdint> from <string> or <vector>, causing the build to fail with:

error: 'uint64_t' was not declared in this scope

The fix is a one-line addition of #include <cstdint> alongside the existing includes.

Fixes #856

🤖 Generated with Claude Code

Fixes build failure on systems where uint64_t is not implicitly
included (e.g., Fedora 43 with newer GCC).

Fixes cmu-db#856

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails on Fedora 43: 'uint64_t' not declared in string_util.h (missing <cstdint> include)

1 participant