title: Build Fail: winsock2.h file not found
body: <p>Added <code>#define _WINSOCKAPI_</code> but still the build is failing.</p>
  
  <pre><code>/*
   * $PostgreSQL: pgsql/src/include/port/win32/sys/socket.h,v 1.7 2006/10/04 00:30:10 momjian Exp $
   */
  #ifndef WIN32_SYS_SOCKET_H
  #define WIN32_SYS_SOCKET_H
  
  /*
   * Unfortunately, &lt;wingdi.h&gt; of VC++ also defines ERROR.
   * To avoid the conflict, we include &lt;windows.h&gt; here and undefine ERROR
   * immediately.
   *
   * Note: Don't include &lt;wingdi.h&gt; directly.  It causes compile errors.
   */
  #define _WINSOCKAPI_    //added this line but no help
  #include &lt;winsock2.h&gt;
  #include &lt;ws2tcpip.h&gt;
  #include &lt;windows.h&gt;
  
  #undef ERROR
  #undef small
  
  /* Restore old ERROR value */
  #ifdef PGERROR
  #define ERROR PGERROR
  #endif
  
  /*
   * we can't use the windows gai_strerror{AW} functions because
   * they are defined inline in the MS header files. So we'll use our
   * own
   */
  #undef gai_strerror
  
  #endif   /* WIN32_SYS_SOCKET_H */
  </code></pre>