*** ./error.c.ORIG	Wed Apr  8 01:46:23 2015
--- ./error.c	Wed Apr  8 01:46:46 2015
***************
*** 40,45 ****
--- 40,50 ----
  } ;
  
  
+ #ifdef _AIX
+ #define MSG_DONTWAIT MSG_NONBLOCK
+ #endif
+ 
+ 
  static void _diag_exit(int status);
  
  
*** ./sycls.c.ORIG	Wed Apr  8 08:46:28 2015
--- ./sycls.c	Wed Apr  8 08:48:23 2015
***************
*** 1529,1534 ****
--- 1529,1569 ----
     return result;
  }
  
+ #ifdef _AIX51
+ int
+ unsetenv( const char *name )
+ {
+   size_t len;
+   char **ep;
+ 
+   if ((name == NULL) || (*name == '\0') || (strchr( name, '=' ) != NULL))
+   {
+     errno = EINVAL;
+     return( -1 );
+   }
+ 
+   len = strlen( name );
+ 
+   ep = environ;
+   while (*ep != NULL)
+     if (! strncmp( *ep, name, len ) && (*ep)[len] == '=')
+     {
+ /* Found it.  Remove this pointer by moving later ones back.  */
+       char **dp = ep;
+ 
+       do
+         dp[0] = dp[1];
+       while (*dp++);
+ /* Continue the loop in case NAME appears again.  */
+     }
+   else
+     ++ep;
+ 
+   return( 0 );
+ }
+ #define HAVE_UNSETENV 1
+ #endif
+ 
  #if HAVE_UNSETENV
  /* on Linux it returns int but on FreeBSD void.
     we do not expect many errors, so we take void which works on all systems. */
