commit | f8c65b10c0486d924e991a819dea983bd3308c65 | [log] [tgz] |
---|---|---|
author | Eli Lipsitz <elipsitz@google.com> | Wed Mar 08 22:46:50 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Mar 08 22:46:50 2023 +0000 |
tree | 69d7a9c4027ffbfd69e5bc884cf41afe810bf735 | |
parent | b2ce96addbb28ef7d4f6f63b77029a24bab6156a [diff] |
pw_stream: Fix SocketStream compilation on macOS SocketStream was using the MSG_NOSIGNAL flag with send to avoid getting a SIGPIPE when the remote peer drops the connection. This works on Linux only. On macOS, you have to set a sockopt on the socket. This commit guards the Linux-only code to only compile on Linux, and adds the equivalent macOS code (guarded to only compile on macOS). Change-Id: I731ebf7deea0ae2fcc043858b498badc1d399516 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/132010 Commit-Queue: Eli Lipsitz <elipsitz@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.