Miscellaneous fixes to try to make other compilers happier
[u/mdw/putty] / noise.c
diff --git a/noise.c b/noise.c
index ad257f5..1d764d5 100644 (file)
--- a/noise.c
+++ b/noise.c
@@ -4,6 +4,13 @@
  */
 
 #include <windows.h>
+#ifndef AUTO_WINSOCK
+#ifdef WINSOCK_TWO
+#include <winsock2.h>
+#else
+#include <winsock.h>
+#endif
+#endif
 #include <stdio.h>
 
 #include "putty.h"
@@ -14,7 +21,7 @@
  * GetSystemPowerStatus function.
  */
 typedef BOOL (WINAPI *gsps_t)(LPSYSTEM_POWER_STATUS);
-gsps_t gsps;
+static gsps_t gsps;
 
 /*
  * This function is called once, at PuTTY startup, and will do some