*** ./src/network.cc.ORIG	Wed Apr 13 21:01:53 2011
--- ./src/network.cc	Wed Apr 13 21:02:21 2011
***************
*** 283,288 ****
--- 283,292 ----
     return a;
  }
  
+ #ifdef _AIX51
+ #define IPV6_V6ONLY             37   /* IPv6 only communication */
+ #endif
+ 
  void Networker::SocketSinglePF(int s,int pf)
  {
  #if INET6
*** ./lib/error.c.ORIG	Wed Jun 29 23:59:58 2011
--- ./lib/error.c	Wed Jun 29 23:53:07 2011
***************
*** 104,110 ****
--- 104,112 ----
  #  if STRERROR_R_CHAR_P
  char *strerror_r ();
  #  else
+ #ifndef _AIX
  int strerror_r ();
+ #endif
  #  endif
  # endif
  
*** ./src/lftp_ssl.cc.ORIG	Mon Oct 13 19:50:03 2014
--- ./src/lftp_ssl.cc	Mon Oct 13 19:50:43 2014
***************
*** 560,566 ****
     {
        if(res==GNUTLS_E_AGAIN || res==GNUTLS_E_INTERRUPTED)
  	 return RETRY;
!       else if(res==GNUTLS_E_UNEXPECTED_PACKET_LENGTH || res==GNUTLS_E_PREMATURE_TERMINATION)
        {
  	 Log::global->Format(7,"gnutls_record_recv: %s Assuming EOF.\n",gnutls_strerror(res));
  	 return 0;
--- 560,566 ----
     {
        if(res==GNUTLS_E_AGAIN || res==GNUTLS_E_INTERRUPTED)
  	 return RETRY;
!       else if(res==GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
        {
  	 Log::global->Format(7,"gnutls_record_recv: %s Assuming EOF.\n",gnutls_strerror(res));
  	 return 0;
