--- helpers/basic_auth/PAM/pam_auth.c.orig	2009-10-29 21:05:38.000000000 +1100
+++ helpers/basic_auth/PAM/pam_auth.c	2009-12-19 11:56:26.000000000 +1100
@@ -73,7 +73,15 @@
 #include <time.h>
 #include <unistd.h>
 
+#if defined(__APPLE__)
+#include <AvailabilityMacros.h>
+#endif
+
+#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+#include <pam/pam_appl.h>
+#else
 #include <security/pam_appl.h>
+#endif
 
 #define BUFSIZE 8192
 
