diff --git a/contrib/win32/openssh/Win32-OpenSSH.sln b/contrib/win32/openssh/Win32-OpenSSH.sln
index 3f69841..f60058e 100644
--- a/contrib/win32/openssh/Win32-OpenSSH.sln
+++ b/contrib/win32/openssh/Win32-OpenSSH.sln
@@ -116,6 +116,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32compatUnittests", "win
{8660C2FE-9874-432D-B047-E042BB41DBE0} = {8660C2FE-9874-432D-B047-E042BB41DBE0}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32iocompat", "win32iocompat.vcxproj", "{0D02F0F0-013B-4EE3-906D-86517F3822C0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -260,6 +262,14 @@ Global
{780CAFE4-4BC5-407B-B3A6-71C4114826A7}.Release|x64.Build.0 = Release|x64
{780CAFE4-4BC5-407B-B3A6-71C4114826A7}.Release|x86.ActiveCfg = Release|Win32
{780CAFE4-4BC5-407B-B3A6-71C4114826A7}.Release|x86.Build.0 = Release|Win32
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Debug|x64.ActiveCfg = Debug|x64
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Debug|x64.Build.0 = Debug|x64
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Debug|x86.ActiveCfg = Debug|Win32
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Debug|x86.Build.0 = Debug|Win32
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x64.ActiveCfg = Release|x64
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x64.Build.0 = Release|x64
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x86.ActiveCfg = Release|Win32
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/contrib/win32/openssh/win32compat.vcxproj b/contrib/win32/openssh/win32compat.vcxproj
index 86351cd..874ec42 100644
--- a/contrib/win32/openssh/win32compat.vcxproj
+++ b/contrib/win32/openssh/win32compat.vcxproj
@@ -152,10 +152,6 @@
-
-
-
-
@@ -182,7 +178,6 @@
-
diff --git a/contrib/win32/openssh/win32compatUnittests.vcxproj b/contrib/win32/openssh/win32compatUnittests.vcxproj
index 0dd0d0c..a499b59 100644
--- a/contrib/win32/openssh/win32compatUnittests.vcxproj
+++ b/contrib/win32/openssh/win32compatUnittests.vcxproj
@@ -113,7 +113,7 @@
Console
true
$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)
- win32compat.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
+ win32iocompat.lib;win32compat.lib;libssh.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
targetos.manifest
@@ -126,7 +126,7 @@
Disabled
_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
false
- $(OpenSSH-Src-Path)contrib\win32\win32compat\inc;
+ $(OpenSSH-Src-Path)contrib\win32\win32compat\inc
CompileAsC
MultiThreadedDebug
ProgramDatabase
@@ -135,7 +135,7 @@
Console
true
$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)
- libssh.lib;win32compat.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
+ win32iocompat.lib;win32compat.lib;libssh.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
targetos.manifest
@@ -159,7 +159,7 @@
true
true
$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)
- win32compat.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
+ win32iocompat.lib;win32compat.lib;libssh.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
targetos.manifest
@@ -184,7 +184,7 @@
true
true
$(OpenSSH-Lib-Path)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)
- win32compat.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
+ win32iocompat.lib;win32compat.lib;libssh.lib;mswsock.lib;ws2_32.lib;%(AdditionalDependencies)
targetos.manifest
diff --git a/contrib/win32/openssh/win32iocompat.vcxproj b/contrib/win32/openssh/win32iocompat.vcxproj
new file mode 100644
index 0000000..c753642
--- /dev/null
+++ b/contrib/win32/openssh/win32iocompat.vcxproj
@@ -0,0 +1,155 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {0D02F0F0-013B-4EE3-906D-86517F3822C0}
+ win32iocompat
+ Win32Proj
+ 8.1
+
+
+
+ StaticLibrary
+ v140
+ MultiByte
+ true
+
+
+ StaticLibrary
+ v140
+ MultiByte
+ true
+
+
+ StaticLibrary
+ v140
+ MultiByte
+
+
+ StaticLibrary
+ v140
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>14.0.23107.0
+
+
+ $(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\$(TargetName)\
+
+
+ $(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\$(TargetName)\
+
+
+ $(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\$(TargetName)\
+
+
+ $(OpenSSH-Lib-Path)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\$(TargetName)\
+
+
+
+ Disabled
+
+
+ USE_MSCNG;_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebug
+ NotUsing
+ Level1
+ ProgramDatabase
+ false
+ false
+
+
+
+
+ Disabled
+
+
+ USE_MSCNG;_WIN32_WINNT=0x501;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
+ EnableFastChecks
+ MultiThreadedDebug
+ NotUsing
+ Level1
+ ProgramDatabase
+ false
+
+
+
+
+
+
+ _LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_MSCNG;_WIN32_WINNT=0x501;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreaded
+ NotUsing
+ Level1
+ ProgramDatabase
+ false
+
+
+
+
+
+
+ _LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_MSCNG;_WIN32_WINNT=0x501;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreaded
+ NotUsing
+ Level1
+ ProgramDatabase
+ false
+ Disabled
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/contrib/win32/openssh/win32iocompat.vcxproj.filters b/contrib/win32/openssh/win32iocompat.vcxproj.filters
new file mode 100644
index 0000000..7cd9fcb
--- /dev/null
+++ b/contrib/win32/openssh/win32iocompat.vcxproj.filters
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/regress/unittests/win32compat/socket_tests.c b/regress/unittests/win32compat/socket_tests.c
index 1c905a4..2b3c30c 100644
--- a/regress/unittests/win32compat/socket_tests.c
+++ b/regress/unittests/win32compat/socket_tests.c
@@ -13,6 +13,9 @@
#define BACKLOG 2
#define SMALL_RECV_BUF_SIZE 128
+/* remove this later once right header is included*/
+#define O_NONBLOCK 0x0004
+
#pragma warning(disable:4267)
int listen_fd, accept_fd, connect_fd, ret;