]> granicus.if.org Git - libevent/commitdiff
Fix compilation of recent error code with win32.
authorNick Mathewson <nickm@torproject.org>
Fri, 5 Sep 2008 16:47:04 +0000 (16:47 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 5 Sep 2008 16:47:04 +0000 (16:47 +0000)
svn:r937

evutil.c
signal.c

index 43f1227c75ac3064f936a469b7b6bba5eb6beff6..33f42e1b74725e22cdb7c85eb9bc5f9d405d878c 100644 (file)
--- a/evutil.c
+++ b/evutil.c
@@ -305,10 +305,10 @@ evutil_socket_error_to_string(int errcode)
   /* XXXX Is there really no built-in function to do this? */
   int i;
   for (i=0; windows_socket_errors[i].code >= 0; ++i) {
-    if (e == windows_socket_errors[i].code)
+    if (errcode == windows_socket_errors[i].code)
       return windows_socket_errors[i].msg;
   }
-  return strerror(e);
+  return strerror(errcode);
 }
 #endif
 
index 64d96e28f2a50d20325b1c22fdbf6ccd11f1bac2..4145b4ef12ad106a260d5e9952efb9e751c6be93 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -300,7 +300,7 @@ evsignal_handler(int sig)
        send(evsignal_base->sig.ev_signal_pair[0], "a", 1, 0);
        errno = save_errno;
 #ifdef WIN32
-       EVUTIL_SET_SOCKET_ERRNO(socket_error);
+       EVUTIL_SET_SOCKET_ERROR(socket_errno);
 #endif
 }