Skip to content

fix(windows): Fix offset type issue in client lib LS-364#761

Merged
rolysr merged 1 commit intodevfrom
fix-offset-type-window-issue
Feb 23, 2026
Merged

fix(windows): Fix offset type issue in client lib LS-364#761
rolysr merged 1 commit intodevfrom
fix-offset-type-window-issue

Conversation

@rolysr
Copy link
Collaborator

@rolysr rolysr commented Feb 23, 2026

Due to changes introduced in commit 84c158a, the Windows client related code was not compiling correctly because of an offset type issue. This commit addresses that issue by ensuring correct cross-platform compatibility for client base library.

@rolysr rolysr self-assigned this Feb 23, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @rolysr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a compilation failure on Windows platforms within the client library. A recent commit introduced an incompatibility with offset type definitions, which this change rectifies by standardizing the type usage, thereby restoring correct build behavior and maintaining cross-platform support.

Highlights

  • Windows Client Compilation Fix: Corrected an offset type issue in the client library by changing __off_t to _off_t to resolve compilation errors on Windows, ensuring cross-platform compatibility.
Changelog
  • src/mount/sauna_client.cc
    • Replaced __off_t with _off_t for st_size assignment to fix Windows compilation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@rolysr
Copy link
Collaborator Author

rolysr commented Feb 23, 2026

@gemini-code-assist review

@rolysr rolysr requested a review from Copilot February 23, 2026 15:30
@rolysr rolysr changed the title fix(windows): Fix offset type issue in client lib fix(windows): Fix offset type issue in client lib LS-364 Feb 23, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a compilation issue on Windows by changing the offset type from the non-standard __off_t to _off_t. The suggested change to use the POSIX standard off_t type for better portability and consistency has been retained.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request addresses a compilation issue on Windows by replacing the glibc-specific __off_t type with _off_t. However, _off_t is not a standard POSIX type and is likely to cause build failures on Linux systems where it is not defined in standard headers. The standard POSIX type off_t should be used instead, as it is already used consistently throughout the rest of the file and is available on both Windows and Linux platforms.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request attempts to fix a Windows compilation issue introduced by commit 84c158a by changing a type cast from __off_t to _off_t when assigning a file size value to the st_size field of a struct stat.

Changes:

  • Changed type cast from __off_t to _off_t in the lookup function when assigning maxFileLen to e.attr.st_size

@rolysr rolysr force-pushed the fix-offset-type-window-issue branch from cc9fe70 to 8be0daf Compare February 23, 2026 15:48
Commit 84c158a introduced usage of __off_t, which is a non-standard
glibc internal type. This caused the Windows client library to fail
to compile.

Replace __off_t with a portable, cross-platform offset type to restore
Windows build compatibility.

Signed-off-by: rolysr <rolysr@leil.io>
@rolysr rolysr force-pushed the fix-offset-type-window-issue branch from 8be0daf to 0d3b94a Compare February 23, 2026 16:04
@rolysr rolysr marked this pull request as ready for review February 23, 2026 16:23
@rolysr rolysr merged commit 15786c0 into dev Feb 23, 2026
11 checks passed
@rolysr rolysr deleted the fix-offset-type-window-issue branch February 23, 2026 21:58
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.

4 participants