Archive Index
This month's Index
|
Subject: [libssh2] [ libssh2-Bugs-1862722 ] libssh2_poll doesn't work on win32
[libssh2] [ libssh2-Bugs-1862722 ] libssh2_poll doesn't work on win32
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 02 Jan 2008 13:28:56 -0800
Bugs item #1862722, was opened at 2008-01-02 13:28
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
I found that the reason for this was that on WIN32, neither HAVE_SELECT nor HAVE_POLL get defined. The way libssh2_poll is written assumes that either the "ifdef HAVE_POLL" or "ifdef HAVE_SELECT" block of code will get exected. If neither executes then no packets ever actually get read, it it just returns garbage.
Since Win32 does provide select, I simply defined HAVE_SELECT in win32/libssh2_config.h, and also made a small change to libssh2_priv.h so it won't try to include unix-only header files on windows. This made libssh2_poll work correctly on Windows. I've tested this patch with VStudio 2003 on a win32 machine, and VStudio 2005 on a win64 machine.
The patch file is attached.
----------------------------------------------------------------------
You can respond by visiting:
-------------------------------------------------------------------------
|