I need some code changes for Windows support. e.g. --- a/src/lib/libssl/src/crypto/bio/bss_dgram.c +++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c @@ -57,13 +57,17 @@ * */
+#ifdef _WIN32 +#include <ws2tcpip.h> +#else #include <sys/socket.h> -#include <sys/time.h> - #include <netinet/in.h> +#include <netdb.h> +#endif + +#include <sys/time.h> #include <errno.h> -#include <netdb.h> #include <stdio.h> #include <string.h> #include <unistd.h> I think the following patch is ugly: +#ifdef HAVE_WS2TCPIP_h +#include <ws2tcpip.h> +#endif +#ifdef HAVE_NETDB_H +#include <netdb.h> +#endif +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif Which patch format acceptable, guard _WIN32 or every header file which not all platform have ? Or there have another approach ?