*** ./git-compat-util.h.ORIG	Fri Jul 23 10:09:14 2010
--- ./git-compat-util.h	Fri Jul 23 10:16:06 2010
***************
*** 125,135 ****
  #include "compat/msvc.h"
  #endif
  
  #ifndef NO_LIBGEN_H
  #include <libgen.h>
  #else
! #define basename gitbasename
! extern char *gitbasename(char *);
  #endif
  
  #ifndef NO_ICONV
--- 125,138 ----
  #include "compat/msvc.h"
  #endif
  
+ #ifdef _AIX51
+ #define NO_LIBGEN_H
+ #endif
+ 
  #ifndef NO_LIBGEN_H
  #include <libgen.h>
  #else
! extern char *basename(char *);
  #endif
  
  #ifndef NO_ICONV
*** ./configure.ORIG	Fri Feb 18 13:05:40 2011
--- ./configure	Fri Feb 18 13:10:52 2011
***************
*** 6240,6246 ****
  # -D_REENTRANT' or some such.
  elif test -z "$PTHREAD_CFLAGS"; then
    threads_found=no
!   for opt in -mt -pthread -lpthread; do
       old_CFLAGS="$CFLAGS"
       CFLAGS="$opt $CFLAGS"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for POSIX Threads with '$opt'" >&5
--- 6240,6246 ----
  # -D_REENTRANT' or some such.
  elif test -z "$PTHREAD_CFLAGS"; then
    threads_found=no
!   for opt in -qthreaded -mt -pthread -lpthread; do
       old_CFLAGS="$CFLAGS"
       CFLAGS="$opt $CFLAGS"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for POSIX Threads with '$opt'" >&5
