diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-01-06 19:33:34 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-01-06 19:45:01 -0800 |
| commit | 5e41f10763f7de379b52f8c1a421a1b0aad61041 (patch) | |
| tree | d711c6e4128fd967960b7a424cd191abf26de423 /src | |
| parent | f4908daaaad443834d9f270e7ddc5e2e23d0f7a5 (diff) | |
| download | nng-5e41f10763f7de379b52f8c1a421a1b0aad61041.tar.gz nng-5e41f10763f7de379b52f8c1a421a1b0aad61041.tar.bz2 nng-5e41f10763f7de379b52f8c1a421a1b0aad61041.zip | |
Fix warning from inconsistent socket_pair prototype.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/platform.h | 4 | ||||
| -rw-r--r-- | src/platform/posix/posix_socketpair.c | 4 | ||||
| -rw-r--r-- | src/platform/windows/win_socketpair.c | 2 | ||||
| -rw-r--r-- | src/supplemental/util/platform.c | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/core/platform.h b/src/core/platform.h index 0b5ec634..2e6c7eb8 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // Copyright 2018 Devolutions <info@devolutions.net> // @@ -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 3a01ad2b..bb2698b7 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 0ed0443a..f97df2fd 100644 --- a/src/platform/windows/win_socketpair.c +++ b/src/platform/windows/win_socketpair.c @@ -18,7 +18,7 @@ #include <sys/socket.h> 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 99daaef6..0f9e7a1a 100644 --- a/src/supplemental/util/platform.c +++ b/src/supplemental/util/platform.c @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // 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 +} |
