Subject: [ libssh2-Bugs-2809163 ] Windows compile error with latest snapshot

[ libssh2-Bugs-2809163 ] Windows compile error with latest snapshot

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 26 Jun 2009 18:48:01 +0000

Bugs item #2809163, was opened at 2009-06-19 19:36
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2809163&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Neil Gierman (roadrunn)
>Assigned to: Daniel Stenberg (bagder)
Summary: Windows compile error with latest snapshot

Initial Comment:
I sent this to the mail list but figured I post this bug as well.

The latest libssh2 snapshot has a few compiler errors with windows Visual Studio 2008:

1>hostkey.c
1>c:\users\giermang\new\libssh2-1.1\src\hostkey.c(445) : error C2491: 'libssh2_hostkey_hash' : definition of dllimport function not allowed
1>c:\users\giermang\new\libssh2-1.1\src\hostkey.c(468) : error C2491: 'libssh2_session_hostkey' : definition of dllimport function not allowed

I have tracked this down to an extra include of "libssh2.h" in both hostkey.c and knownhost.c. The below patch fixes the issue in Windows and still compiles in Linux as well:

--- src\hostkey.c 2009-05-20 08:08:43.000000000 -0500
+++ src\hostkey.c 2009-06-14 19:50:53.000000000 -0500
@@ -33,13 +33,12 @@
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  * OF SUCH DAMAGE.
  */
 
-#include "libssh2.h"
 #include "libssh2_priv.h"
 #include "misc.h"
 
 /* Needed for struct iovec on some platforms */ #ifdef HAVE_SYS_UIO_H #include <sys/uio.h>
--- src\knownhost.c 2009-06-10 21:02:03.000000000 -0500
+++ src\knownhost.c 2009-06-14 19:51:21.000000000 -0500
@@ -33,13 +33,12 @@
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  * OF SUCH DAMAGE.
  */
 
-#include "libssh2.h"
 #include "libssh2_priv.h"
 #include "misc.h"
 
 struct known_host {
     struct list_node node;
     char *name; /* points to the name or the hash (allocated) */

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-06-26 20:48

Message:
Thanks for your report and help in improving libssh2!

A fix has just been committed to the source code repo, this case is now
considered fixed and closed!

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2809163&group_id=125852

------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-06-26