aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_socketpair.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-14 23:18:33 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-14 23:18:33 -0800
commitb4fdf7a04fc1018f1114fb8ee6f16009752cd16f (patch)
treec076e06ebda71da190b9031912bd3bb428bd8fed /src/platform/posix/posix_socketpair.c
parenta7a2cdb0201a6e85caae621e748cfab03998b6a6 (diff)
downloadnng-b4fdf7a04fc1018f1114fb8ee6f16009752cd16f.tar.gz
nng-b4fdf7a04fc1018f1114fb8ee6f16009752cd16f.tar.bz2
nng-b4fdf7a04fc1018f1114fb8ee6f16009752cd16f.zip
socketpair: use nng_err
Diffstat (limited to 'src/platform/posix/posix_socketpair.c')
-rw-r--r--src/platform/posix/posix_socketpair.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/platform/posix/posix_socketpair.c b/src/platform/posix/posix_socketpair.c
index bb2698b7..b2d3ef4d 100644
--- a/src/platform/posix/posix_socketpair.c
+++ b/src/platform/posix/posix_socketpair.c
@@ -1,5 +1,5 @@
//
-// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
@@ -17,7 +17,7 @@
#include <errno.h>
#include <sys/socket.h>
-int
+nng_err
nni_socket_pair(int fds[2])
{
int rv;
@@ -28,14 +28,16 @@ nni_socket_pair(int fds[2])
#ifdef SO_NOSIGPIPE
int set = 1;
- setsockopt(fds[0], SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
- setsockopt(fds[1], SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
+ setsockopt(
+ fds[0], SOL_SOCKET, SO_NOSIGPIPE, (void *) &set, sizeof(int));
+ setsockopt(
+ fds[1], SOL_SOCKET, SO_NOSIGPIPE, (void *) &set, sizeof(int));
#endif
return (0);
}
#else
-int
+nng_err
nni_socket_pair(int fds[2])
{
return (NNG_ENOTSUP);