Hi libssh2-developers, 
  
 I compiled libssh2 successfull after some days of try-and-error. I wasn't 
able to compile the examples, but the ssh2_sample.c from version 0.14 was 
build and runnable with version from 0.15pre (cvs-snapshot). 
  
 The problem with AIX was also found and solved by this patch 
http://www.mail-archive.com/libssh2-devel%40lists.sourceforge.net/msg00003.html 
 but the changes are to big - and not accepted yet. 
  
 Now I succeeded on AIX (5.2 in my case) with a small change in 
libssh2_priv.h . 
  
 The problem is that libssh.h is included before sys/poll.h gets included, 
where the structure member "event" and "revent" are changed through 
preprocessor defines. So my change include sys/poll.h after libssh2_config.h 
but before libssh2.h in libssh2_priv.h - but only if needed (#ifdef 
HAVE_POLL). 
  
 The second change include the file sys/ioctl.h which is needed for the define 
of FIONBIO on AIX. 
  
 Here is the patch made from daily-snapshot-version of 2007-03-27: 
 --------------------------- snip --------------------------- 
 *** src/libssh2_priv.h Wed Mar 28 15:30:25 2007 
 --- src/libssh2_priv.patch.h Wed Mar 28 15:24:43 2007 
 *************** 
 *** 40,45 **** 
 --- 40,59 ---- 
  
 #define LIBSSH2_LIBRARY 
 #include "libssh2_config.h" 
 +  
 + #ifdef HAVE_POLL 
 + # include <sys/poll.h> 
 + #else 
 + # ifdef HAVE_SELECT 
 + # ifdef HAVE_SYS_SELECT_H 
 + # include <sys/select.h> 
 + # else 
 + # include <sys/time.h> 
 + # include <sys/types.h> 
 + # endif 
 + # endif 
 + #endif 
 +  
 #include "libssh2.h" 
  
 #include <stdio.h> 
 *************** 
 *** 46,51 **** 
 --- 60,66 ---- 
  
 #ifndef WIN32 
 #include <sys/socket.h> 
 + #include <sys/ioctl.h> 
 #endif 
  
 #ifdef LIBSSH2_LIBGCRYPT 
 --------------------------- snap --------------------------- 
  
 I applied this patch after running configure-script. You could put it in the 
libssh2_priv.h file permanently - because I tested it with this patch also 
successfull on HP-UX 11i and Linux (SUSE Linux Enterprise Server 9). 

Would you include the patch in libssh2-0.15?
-- 
 Regards 
 Michael Augustin 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to