Subject: compilation error when cross compiling on linux to Windows

compilation error when cross compiling on linux to Windows

From: Vincent Torri <vincent.torri_at_gmail.com>
Date: Mon, 31 Oct 2011 10:39:20 +0100

Hey,

when cross compiling to Windows, libssh2.h include Windows header files
with upper case filenames : BaseTsd.h and WinSock2.h.

These files have lowercase names with mingw-w64 (iirc, it's the same with
mingw). And as on Windows, being lowercase or uppercase does not matter, I
think that the following patch should work everywhere:

--- ./include/libssh2.h 2011-09-06 22:56:34.000000000 +0200
+++ ../libssh2-1.3.0_new/include/libssh2.h 2011-10-31 10:34:11.000000000
+0100
@@ -88,8 +88,8 @@
 extern "C" {
 #endif
 #ifdef _WIN32
-# include <BaseTsd.h>
-# include <WinSock2.h>
+# include <basetsd.h>
+# include <winsock2.h>
 #endif

 #include <stddef.h>

regards

Vincent Torri

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-10-31