From: Sam Hartman Date: Mon, 19 Sep 2011 00:59:24 +0000 (+0000) Subject: Use closesocket() instead of close() for sockets on Windows X-Git-Tag: krb5-1.10-alpha1~169 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e78fcbfbee48aa95d5423b37599e2dfe16ca7d2;p=krb5.git Use closesocket() instead of close() for sockets on Windows Signed-off-by: Alexey Melnikov Signed-off-by: Sam Hartman git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25206 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c index 9b5cab29e..c08b71497 100644 --- a/src/appl/gss-sample/gss-server.c +++ b/src/appl/gss-sample/gss-server.c @@ -320,12 +320,12 @@ create_socket(u_short port) (void) setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)); if (bind(s, (struct sockaddr *) &saddr, sizeof(saddr)) < 0) { perror("binding socket"); - (void) close(s); + (void) closesocket(s); return -1; } if (listen(s, 5) < 0) { perror("listening on socket"); - (void) close(s); + (void) closesocket(s); return -1; } return s;