diff --git a/src/core/platform.h b/src/core/platform.h index 0b5ec6344..2e6c7eb84 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // Copyright 2018 Devolutions // @@ -445,7 +445,7 @@ extern int nni_plat_udp_sockname(nni_plat_udp *, nni_sockaddr *); // in APIs to transport file descriptors, or across a fork/exec boundary (so // that child processes may use these with socket to inherit a socket that is // connected to the parent.) -extern int nni_socket_pair(int *); +extern int nni_socket_pair(int [2]); // // File/Store Support diff --git a/src/platform/posix/posix_socketpair.c b/src/platform/posix/posix_socketpair.c index 3a01ad2bb..bb2698b79 100644 --- a/src/platform/posix/posix_socketpair.c +++ b/src/platform/posix/posix_socketpair.c @@ -36,8 +36,8 @@ nni_socket_pair(int fds[2]) } #else int -nni_socket_pair(int *fds) +nni_socket_pair(int fds[2]) { return (NNG_ENOTSUP); } -#endif \ No newline at end of file +#endif diff --git a/src/platform/windows/win_socketpair.c b/src/platform/windows/win_socketpair.c index 0ed0443ae..f97df2fd8 100644 --- a/src/platform/windows/win_socketpair.c +++ b/src/platform/windows/win_socketpair.c @@ -18,7 +18,7 @@ #include int -nni_socket_pair(int *fds) +nni_socket_pair(int fds[2]) { int rv; rv = socketpair(PF_UNIX, SOCK_STREAM, 0, fds); diff --git a/src/supplemental/util/platform.c b/src/supplemental/util/platform.c index 99daaef64..0f9e7a1ac 100644 --- a/src/supplemental/util/platform.c +++ b/src/supplemental/util/platform.c @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. +// Copyright 2024 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -166,7 +166,7 @@ nng_random(void) } int -nng_socket_pair(int *fds) +nng_socket_pair(int fds[2]) { return (nni_socket_pair(fds)); -} \ No newline at end of file +}