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

have_sys_socket.c: MacOS support for sys_socket_sendto_udp_target() a… #469

Closed
wants to merge 1 commit into from

Conversation

vasiliyk
Copy link
Contributor

Updated src/config/have_sys_socket.c to support MacOS.

MacOS does not support the flag MSG_NOSIGNAL used in:

  • sys_socket_sendto_tcp_target()
  • sys_socket_sendto_udp_target()

but it has an equivalent SO_NOSIGPIPE that prevents SIGPIPE from being raised when a write fails on a socket.

@goatshriek goatshriek self-assigned this Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.59%. Comparing base (1d2df58) to head (106eec9).

Additional details and impacted files
@@           Coverage Diff           @@
##           latest     #469   +/-   ##
=======================================
  Coverage   90.59%   90.59%           
=======================================
  Files          47       47           
  Lines        4379     4381    +2     
  Branches      587      587           
=======================================
+ Hits         3967     3969    +2     
  Misses        279      279           
  Partials      133      133           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@goatshriek goatshriek added the bug something is broken or missing label Oct 21, 2024
@goatshriek
Copy link
Owner

Thanks very much for submitting this, it isn't something I was aware of.

From what I can see there are other BSD systems (FreeBSD, for example) that also have this difference. I'd most prefer to add this as a configure check in the CMakeLists.txt to define a configuration #define for the socket option in either case. The process for this is described here. This is a bit more work than what this pull request includes, so I understand if you'd rather not go through this. Let me know if you'd prefer not to go through that, and if so I'll put together a patch myself.

@vasiliyk
Copy link
Contributor Author

Joel, I will do it and open another PR.

@vasiliyk vasiliyk closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is broken or missing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants