Skip to content

Conversation

@AliRezaBeigy
Copy link
Contributor

@AliRezaBeigy AliRezaBeigy commented Jan 22, 2026

Adds sin_len and sin6_len fields to sockaddr_in and sockaddr_in6 structs for macOS compatibility. These fields are required on macOS but not on other platforms.

Changes:

  • Add sin_len/sin6_len fields in runtime.rs and udp_fallback.rs
  • Use conditional compilation to only apply on macOS

I test and build the changes in https://github.com/AliRezaBeigy/slipstream-rust-deploy

Addresses #14.

@AliRezaBeigy AliRezaBeigy force-pushed the macos-sockaddr-compat branch from 6360a22 to 7410138 Compare January 22, 2026 18:28
@AliRezaBeigy
Copy link
Contributor Author

^ @Mygod thanks for your time.

Copy link
Contributor

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 adds macOS compatibility for sockaddr structures by including the sin_len and sin6_len length fields required by BSD-based systems. These fields must be the first members in sockaddr_in and sockaddr_in6 structures on BSD platforms.

Changes:

  • Added conditional sin_len field to sockaddr_in struct initialization
  • Added conditional sin6_len field to sockaddr_in6 struct initializations
  • Used #[cfg(target_os = "macos")] to conditionally compile these fields

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
crates/slipstream-ffi/src/runtime.rs Added sin_len and sin6_len fields to sockaddr struct initializations in socket_addr_to_storage function
crates/slipstream-server/src/udp_fallback.rs Added sin6_len field to sockaddr_in6 initialization in dummy_sockaddr_storage function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Mygod Mygod self-assigned this Jan 23, 2026
@Mygod Mygod requested a review from Copilot January 24, 2026 00:41
@Mygod
Copy link
Owner

Mygod commented Jan 24, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Mygod Mygod merged commit e797926 into Mygod:main Jan 24, 2026
15 checks passed
@Mygod Mygod added the enhancement New feature or request label Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants