[posix] fix typo in error handling on macOS (#5394)

This commit is contained in:
kangping
2020-08-15 16:46:10 -07:00
committed by GitHub
parent c923dff5c7
commit 0e11f8bd9b
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -33,6 +33,7 @@ main()
{
"$(dirname "$0")"/check-posix-build-autotools
"$(dirname "$0")"/check-posix-build-cmake
"$(dirname "$0")"/check-posix-build-cmake -DOT_DAEMON=ON
}
main "$@"
+2 -2
View File
@@ -50,11 +50,11 @@ build()
main()
{
reset_source
build
build "$@"
if [[ $OSTYPE != "darwin"* ]]; then
reset_source
build -DOT_POSIX_CONFIG_RCP_BUS=SPI
build -DOT_POSIX_CONFIG_RCP_BUS=SPI "$@"
fi
}
+2 -2
View File
@@ -237,8 +237,8 @@ static void InitializeSessionSocket(void)
// if we have SO_NOSIGPIPE, then set it. Otherwise, we're going
// to simply ignore it.
#if defined(SO_NOSIGPIPE)
rval = 1;
VerifyOrExit((rval = setsockopt(sSessionSocket, SOL_SOCKET, SO_NOSIGPIPE, &rval, sizeof(rval)) != -1, OT_NOOP));
rval = setsockopt(sSessionSocket, SOL_SOCKET, SO_NOSIGPIPE, &rval, sizeof(rval));
VerifyOrExit(rval != -1, OT_NOOP);
#else
#warning "no support for MSG_NOSIGNAL or SO_NOSIGPIPE"
#endif