Skip to content

Missing #include <cstdint> in CloseableStreamBuf.h breaks build on musl/strict toolchains #3838

Closed

Description

@kyusic

Describe the bug

src/aws-cpp-sdk-core/include/aws/core/utils/local/stream/CloseableStreamBuf.h uses int64_t (in the WaitForDrain(int64_t) declarations) but does not #include <cstdint>. It only includes <memory> plus two AWS headers.

On toolchains whose standard library headers do not transitively pull in <cstdint> (e.g. musl libc / Alpine Linux, and some GCC configurations), this fails to compile. On glibc it happens to compile because <cstdint> is pulled in transitively, which is why the problem is easy to miss.

This header was introduced in 1.11.820 (it does not exist in 1.11.740) and is still missing the include on main as of today.

Expected Behavior

CloseableStreamBuf.h compiles on all supported toolchains, including musl/Alpine.

Current Behavior

.../aws/core/utils/local/stream/CloseableStreamBuf.h:21:29: error: 'int64_t' has not been declared
   21 |   virtual bool WaitForDrain(int64_t timeout);
.../aws/core/utils/local/stream/CloseableStreamBuf.h:21:29: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
.../aws/core/utils/local/stream/CloseableStreamBuf.h:31:21: error: 'int64_t' has not been declared
   31 |   bool WaitForDrain(int64_t timeoutMs) override;

which then cascades into the implementation file:

.../source/utils/local/stream/CloseableStreamBuf.cpp:14:6: error: no declaration matches 'bool Aws::Utils::Stream::CloseableStreamBuf::WaitForDrain(int64_t)'

Reproduction Steps

Build aws-cpp-sdk-core with a toolchain that does not transitively include <cstdint> (e.g. GCC on Alpine/musl). We hit it building 1.11.820 via vcpkg on Alpine 3.23 and with musl-based cross compilers; glibc builds (Ubuntu/Fedora) are unaffected.

Possible Solution

Add #include <cstdint> to CloseableStreamBuf.h.

Additional Information/Context

Same class of issue as #3002 (missing includes) and PR #3665 (#include <cstdint> for SecureRandom.h), but CloseableStreamBuf.h is not covered by either.

AWS CPP SDK version used

1.11.820 (also reproduces on current main)

Activity

  1. added
    pr/needs-reviewThis PR needs a review from a Member.
    p2This is a standard priority issue
    on Jun 8, 2026
  2. sbiscigl commented on Jun 8, 2026

    @sbiscigl
    Contributor

    should be merged to main now will be released as tag 1.11.823 1.11.824 later today

  3. added
    pending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.
    and removed
    pr/needs-reviewThis PR needs a review from a Member.
    on Jun 8, 2026
  4. sbiscigl commented on Jun 8, 2026

    @sbiscigl
    Contributor

    released, closing, thanks for the report! let me know if you have any questions!

  5. github-actions commented on Jun 8, 2026

    @github-actions

    This issue is now closed. Comments on closed issues are hard for our team to see.
    If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2This is a standard priority issuepending-releaseThis issue will be fixed by an approved PR that hasn't been released yet.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions