]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winnet.c
Fixes for winelib building (used by our Coverity build).
[PuTTY.git] / windows / winnet.c
index d9da95ce59570f3665120000c7a9155233d720aa..fb121e3f7ea681a9cf2645a5aa063c4a91429bdb 100644 (file)
@@ -5,11 +5,15 @@
  * unfix.org.
  */
 
+#include <winsock2.h> /* need to put this first, for winelib builds */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
 
 #define DEFINE_PLUG_METHOD_MACROS
+#define NEED_DECLARATION_OF_SELECT     /* in order to initialise it */
+
 #include "putty.h"
 #include "network.h"
 #include "tree234.h"
@@ -236,6 +240,13 @@ int sk_startup(int hi, int lo)
     return TRUE;
 }
 
+/* Actually define this function pointer, which won't have been
+ * defined alongside all the others by PUTTY_DO_GLOBALS because of the
+ * annoying winelib header-ordering issue. (See comment in winstuff.h.) */
+DECL_WINDOWS_FUNCTION(/* empty */, int, select,
+                     (int, fd_set FAR *, fd_set FAR *,
+                      fd_set FAR *, const struct timeval FAR *));
+
 void sk_init(void)
 {
 #ifndef NO_IPV6