*** ./src/sldisply.c.ORIG	Tue Sep  8 15:21:14 2009
--- ./src/sldisply.c	Tue Sep  8 15:21:36 2009
***************
*** 57,64 ****
--- 57,66 ----
  #ifdef SYSV
  # include <sys/termio.h>
  # include <sys/stream.h>
+ # ifndef _AIX
  # include <sys/ptem.h>
  # include <sys/tty.h>
+ # endif
  #endif
  
  #if defined (_AIX) && !defined (FD_SET)
*** ./src/slutty.c.ORIG	Tue Sep  8 15:21:48 2009
--- ./src/slutty.c	Tue Sep  8 15:22:06 2009
***************
*** 38,45 ****
--- 38,47 ----
  # ifndef CRAY
  #  include <sys/termio.h>
  #  include <sys/stream.h>
+ #  ifndef _AIX
  #  include <sys/ptem.h>
  #  include <sys/tty.h>
+ #  endif
  # endif
  #endif
  
*** ./src/slproc.c.ORIG	Tue Sep  8 15:22:54 2009
--- ./src/slproc.c	Tue Sep  8 15:23:04 2009
***************
*** 21,30 ****
  */
  
  #ifndef _XOPEN_SOURCE
! # define _XOPEN_SOURCE
  #endif
  #ifndef _XOPEN_SOURCE_EXTENDED
! # define _XOPEN_SOURCE_EXTENDED
  #endif
  
  #ifndef __EXTENSIONS__
--- 21,30 ----
  */
  
  #ifndef _XOPEN_SOURCE
! # define _XOPEN_SOURCE 500
  #endif
  #ifndef _XOPEN_SOURCE_EXTENDED
! # define _XOPEN_SOURCE_EXTENDED 1
  #endif
  
  #ifndef __EXTENSIONS__
