Skip to content

Conversation

@cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Feb 10, 2026

For WIN64, we should include BaseTsd.h and use typedef for ssize_t definition.

Some building environments define ssize_t as a macro and we should include a proper header for pulling the original SSIZE_T definition.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated Windows build configuration for improved compatibility on 64-bit systems.

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

A modification to the Windows/MSVC compatibility wrapper in cmake/libbacktrace.cmake that changes how ssize_t is defined on 64-bit Windows builds. Instead of directly typedefing __int64, the implementation now includes BaseTsd.h and aliases SSIZE_T after undefining any existing ssize_t.

Changes

Cohort / File(s) Summary
Windows/MSVC ssize_t compatibility wrapper
cmake/libbacktrace.cmake
Updated unistd.h compatibility layer to define ssize_t by including BaseTsd.h and aliasing SSIZE_T instead of direct __int64 typedef, with preceding undef to avoid conflicts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

backport to v4.0.x

Suggested reviewers

  • edsiper
  • koleini
  • fujimotos

Poem

🐰 A rabbit hops through Windows trails,
Where types were tangled, now prevails,
BaseTsd.h brings proper grace,
ssize_t finds its rightful place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating the Windows unistd.h stub in the CMake build configuration to use a safer approach for handling ssize_t definition.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cosmo0920-use-safer-unistd.h-stub-for-windows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

For WIN64, we should include BaseTsd.h and use typedef for ssize_t
definition.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920
Copy link
Contributor Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant