From 5e78fcbfbee48aa95d5423b37599e2dfe16ca7d2 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 19 Sep 2011 00:59:24 +0000 Subject: [PATCH] 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 --- src/appl/gss-sample/gss-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.26.2