Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sockopt_impl! public #2556

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Make sockopt_impl! public #2556

merged 3 commits into from
Dec 5, 2024

Conversation

asomers
Copy link
Member

@asomers asomers commented Dec 4, 2024

This allows users to define their own sockopts, instead of needing to make a PR to Nix for every single one.

Fixes #577

What does this PR do

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

Sorry, something went wrong.

@asomers asomers force-pushed the pub-sockopt branch 7 times, most recently from e13c295 to 9f6ef59 Compare December 5, 2024 00:24
This allows users to define their own sockopts, instead of needing to
make a PR to Nix for every single one.

Fixes nix-rust#577
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

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

Left some comments

src/sys/socket/sockopt.rs Outdated Show resolved Hide resolved
src/sys/socket/sockopt.rs Show resolved Hide resolved
Comment on lines 110 to 112
use $crate::sys::socket::sockopt::Get;
let mut getter: $getter =
$crate::sys::socket::sockopt::Get::uninit();
Copy link
Member

Choose a reason for hiding this comment

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

Same here

src/sys/socket/sockopt.rs Show resolved Hide resolved
src/sys/socket/sockopt.rs Outdated Show resolved Hide resolved
test/sys/test_sockopt.rs Outdated Show resolved Hide resolved
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

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

Thanks!

@SteveLauC SteveLauC enabled auto-merge December 5, 2024 02:58
@SteveLauC SteveLauC added this pull request to the merge queue Dec 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 5, 2024
@SteveLauC SteveLauC added this pull request to the merge queue Dec 5, 2024
Merged via the queue into nix-rust:master with commit 5c542f4 Dec 5, 2024
40 checks passed
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.

Ability to add custom socket options
2 participants