Skip to content

FreeBSD: Add SOL_LOCAL#5185

Queued
mansiverma897993 wants to merge 1 commit into
rust-lang:mainfrom
mansiverma897993:feat/add-sol-local-freebsd
Queued

FreeBSD: Add SOL_LOCAL#5185
mansiverma897993 wants to merge 1 commit into
rust-lang:mainfrom
mansiverma897993:feat/add-sol-local-freebsd

Conversation

@mansiverma897993

@mansiverma897993 mansiverma897993 commented Jun 19, 2026

Copy link
Copy Markdown

Add SOL_LOCAL constant (value 0) to FreeBSD-like targets (FreeBSD and DragonFlyBSD) to match Apple/macOS targets and allow setting local socket options. Also added it to semver test files.

Source: https://cgit.freebsd.org/src/tree/sys/sys/un.h?id=fa515f60fce0edd09d0b1078852ec06b1cd0a74c#n62

Closes: #5168

@tgross35

Copy link
Copy Markdown
Contributor

Please add links to the relevant headers in the PR description when adding/changing API (the PR template asks for this).

But this seems fine to me, cc @asomers for FreeBSD

@mansiverma897993

Copy link
Copy Markdown
Author

@tgross35
Issue #5168
Fix by #5185 and I will remind it for next time for sure !! (Relevant headers )

@tgross35

Copy link
Copy Markdown
Contributor

You can edit the description and add that all, including the header links :)

@asomers asomers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't find this symbol defined anywhere in DragonflyBSD's man pages or source. So please move the definition into freebsd/mod.rs .

View changes since this review

@mansiverma897993

Copy link
Copy Markdown
Author

Comment thread libc-test/semver/dragonfly.txt Outdated
SOCK_NONBLOCK
SOCK_RAW
SOCK_RDM
SOL_LOCAL

@asomers asomers Jun 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this line really belong here?

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No, it doesn't. I have moved the SOL_LOCAL definition out of the shared freebsdlike module into freebsd/mod.rs, and removed it from dragonfly.txt.

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Content LGTM but this needs a squash, and the commit messages need to be updated to reflect that this is now FreeBSD-only.

The PR template says:

All API changes must have permalinks to headers.

This is so reviewers don't need to hunt for the sources to verify against. I have updated your PR description here, but please make sure to follow what the template asks for in the future.

View changes since this review

@rustbot

rustbot commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Add SOL_LOCAL constant (value 0) to FreeBSD to match Apple/macOS targets and allow setting local socket options.
@mansiverma897993 mansiverma897993 force-pushed the feat/add-sol-local-freebsd branch from 425611e to 321e24b Compare June 21, 2026 04:27
@mansiverma897993

Copy link
Copy Markdown
Author

@rustbot ready

@mansiverma897993

Copy link
Copy Markdown
Author

@rustbot ready

@mansiverma897993

Copy link
Copy Markdown
Author

@tgross35 now check everything is correct or need do it again ?

@tgross35 tgross35 changed the title Add SOL_LOCAL to FreeBSD-like targets FreeBSD: Add SOL_LOCAL Jun 21, 2026

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@tgross35 tgross35 added this pull request to the merge queue Jun 21, 2026
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SOL_LOCAL to FreeBSD-like from sys/un.h

4 participants