fix: Add FreeBSD compatibility for TCP socket options#1187
Merged
FlorentinDUBOIS merged 1 commit intosozu-proxy:mainfrom Nov 30, 2025
Merged
fix: Add FreeBSD compatibility for TCP socket options#1187FlorentinDUBOIS merged 1 commit intosozu-proxy:mainfrom
FlorentinDUBOIS merged 1 commit intosozu-proxy:mainfrom
Conversation
Contributor
yonas
commented
Nov 21, 2025
- Replace Linux-only SOL_TCP with IPPROTO_TCP for FreeBSD
- Add OS-specific TCP option constants (TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT)
- Add missing imports: std::iter::repeat, libc::c_void
- Wrap setsockopt / getsockopt calls for cross-platform compatibility
Collaborator
|
Hello @yonas, Thanks you for the pull request, I hope those changes will help Sozu to run under FreeBSD. |
FlorentinDUBOIS
approved these changes
Nov 21, 2025
Collaborator
FlorentinDUBOIS
left a comment
There was a problem hiding this comment.
Looks good to me, but will wait another review to merge
Wonshtrum
requested changes
Nov 21, 2025
Member
Wonshtrum
left a comment
There was a problem hiding this comment.
Seems good to me.
I would just move the iter::repeat import inside the get_executable_path of freebsd to avoid the unused import warnings.
Or get rid of repeat entirely.
Replace Linux-only SOL_TCP with IPPROTO_TCP for FreeBSD Add OS-specific TCP option constants (TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT) Add missing imports: std::iter::repeat, libc::c_void Wrap setsockopt / getsockopt calls for cross-platform compatibility
01386d3 to
ab485fc
Compare
Contributor
Author
|
I've added @Wonshtrum changes and formatting fixes via |
FlorentinDUBOIS
approved these changes
Nov 30, 2025
Contributor
Author
|
Thanks @FlorentinDUBOIS ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.