public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: fix socketpair prototype
@ 2018-03-09 13:20 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2018-03-09 13:20 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f4a1a186f9f3550b930738d0472bff97728f39e6
commit f4a1a186f9f3550b930738d0472bff97728f39e6
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Fri Mar 9 14:17:39 2018 +0100
Cygwin: fix socketpair prototype
Last parameter is a vector of 2 ints, not a pointer to int
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/include/sys/socket.h | 2 +-
winsup/cygwin/net.cc | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h
index e6b92ee..4b61cb0 100644
--- a/winsup/cygwin/include/sys/socket.h
+++ b/winsup/cygwin/include/sys/socket.h
@@ -40,7 +40,7 @@ extern "C"
int shutdown (int, int);
int socket (int __family, int __type, int __protocol);
int sockatmark (int __fd);
- int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
+ int socketpair (int __domain, int __type, int __protocol, int __fds[2]);
struct servent *getservbyname (const char *__name, const char *__proto);
#endif
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 38a53f8..67cd967 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -2271,7 +2271,7 @@ cygwin_bindresvport (int fd, struct sockaddr_in *sin)
/* socketpair: POSIX.1-2001, POSIX.1-2008, 4.4BSD. */
extern "C" int
-socketpair (int af, int type, int protocol, int *sb)
+socketpair (int af, int type, int protocol, int sv[2])
{
int res = -1;
const device *dev;
@@ -2324,8 +2324,8 @@ socketpair (int af, int type, int protocol, int *sb)
set_std_handle (fd_out);
__try
{
- sb[0] = fd_in;
- sb[1] = fd_out;
+ sv[0] = fd_in;
+ sv[1] = fd_out;
res = 0;
}
__except (EFAULT) {}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-09 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-09 13:20 [newlib-cygwin] Cygwin: fix socketpair prototype Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).