*** ./lib/tpl.c.ORIG	Mon Jan 30 10:55:53 2012
--- ./lib/tpl.c	Mon Jan 30 11:09:23 2012
***************
*** 62,67 ****
--- 62,71 ----
  
  #include "tpl.h"
  
+ #ifndef MAP_FAILED
+ #define MAP_FAILED ((void *)-1)
+ #endif
+ 
  #define TPL_GATHER_BUFLEN 8192
  #define TPL_MAGIC "tpl"
  
*** ./src/fsio.c.ORIG	Mon Jul 28 13:07:39 2014
--- ./src/fsio.c	Mon Jul 28 13:08:18 2014
***************
*** 39,45 ****
  # include <sys/mount.h>
  #endif
  
! #ifdef AIX3
  # include <sys/statfs.h>
  #endif
  
--- 39,45 ----
  # include <sys/mount.h>
  #endif
  
! #ifdef _AIX
  # include <sys/statfs.h>
  #endif
  
***************
*** 2521,2526 ****
--- 2521,2531 ----
  
    return prev_value;
  }
+ 
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #warning O_NOFOLLOW undeclared - ignoring
+ #endif
  
  /* Directory-specific "safe" chmod(2) which attempts to avoid/mitigate
   * symlink attacks.
