*** ./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.
*** ./contrib/mod_snmp/mod_snmp.c.ORIG	Fri Oct  6 18:38:30 2017
--- ./contrib/mod_snmp/mod_snmp.c	Fri Oct  6 18:39:21 2017
***************
*** 1735,1740 ****
--- 1735,1745 ----
    exit(0);
  }
  
+ #ifdef _AIX
+ /* AIX does not have WCOREDUMP */
+ #define WCOREDUMP(x) 0
+ #endif
+ 
  static void snmp_agent_stop(pid_t agent_pid) {
    int res, status;
    time_t start_time = time(NULL);
*** ./contrib/mod_exec.c.ORIG	Fri Oct  6 18:38:12 2017
--- ./contrib/mod_exec.c	Fri Oct  6 18:39:12 2017
***************
*** 428,433 ****
--- 428,438 ----
    return;
  }
  
+ #ifdef _AIX
+ /* AIX does not have WCOREDUMP */
+ #define WCOREDUMP(x) 0
+ #endif
+ 
  /* Provides a "safe" version of the system(2) call by dropping all special
   * privileges, currently retained by the daemon, before exec()'ing the
   * given command.
*** ./modules/mod_auth_unix.c.ORIG	Mon Oct  9 20:25:21 2017
--- ./modules/mod_auth_unix.c	Mon Oct  9 20:29:38 2017
***************
*** 750,755 ****
--- 750,760 ----
    return PR_HANDLED(cmd);
  }
  
+ #if (defined(_AIX) && !defined(_AIX52))
+ extern  int     loginrestrictions(char *, int, char *, char **);
+ extern  int     passwdexpired(char *, char **);
+ #endif
+ 
  MODRET pw_authz(cmd_rec *cmd) {
    /* XXX Any other implementations here? */
  
*** ./configure.ORIG	Mon Oct  9 20:32:00 2017
--- ./configure	Mon Oct  9 20:41:32 2017
***************
*** 15609,15615 ****
  LDFLAGS="-L\$(top_srcdir)/lib $LDFLAGS"
  
  if test $ac_cv_c_compiler_gnu = yes; then
!     LDFLAGS="$LDFLAGS -rdynamic"
  fi
  
  # Record the current CPPFLAGS, LDFLAGS, and LIBS here
--- 15609,15615 ----
  LDFLAGS="-L\$(top_srcdir)/lib $LDFLAGS"
  
  if test $ac_cv_c_compiler_gnu = yes; then
!     LDFLAGS="$LDFLAGS"
  fi
  
  # Record the current CPPFLAGS, LDFLAGS, and LIBS here
***************
*** 15768,15774 ****
  
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
!   CFLAGS="-g2 $fullCFLAGS"
  fi
  
  if test x$exec_prefix = xNONE ; then
--- 15768,15774 ----
  
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  
!   CFLAGS="$fullCFLAGS"
  fi
  
  if test x$exec_prefix = xNONE ; then
