From: Christian Grothoff Date: Sun, 4 Oct 2009 12:46:43 +0000 (+0000) Subject: backup errno X-Git-Tag: initial-import-from-subversion-38251~23391 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b547897ce3fe3ae2a129afb36bf26eadfb695eef;p=oweals%2Fgnunet.git backup errno --- diff --git a/src/util/network.c b/src/util/network.c index a3033d3b0..2e1d40c80 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -148,14 +148,17 @@ int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) { int ret; + int eno; + #ifdef MINGW ret = closesocket (desc->fd); - SetErrnoFromWinsockError (WSAGetLastError ()); + SetErrnoFromWinsockError (WSAGetLastError ()); #else ret = close (desc->fd); #endif - + eno = errno; GNUNET_free (desc); + errno = eno; return ret == 0 ? GNUNET_OK : GNUNET_SYSERR; }