autobuild: fixed clone source for build trees
[samba.git] / nsswitch / pam_winbind.h
index c6b2c5e72695499c5365ee2f3e9eef09dfc4a6e2..ed924794c4866ae516c701c30034c1676e07603d 100644 (file)
@@ -9,7 +9,6 @@
 #include "system/time.h"
 #include <talloc.h>
 #include "libwbclient/wbclient.h"
-#include "localedir.h"
 
 #define MODULE_NAME "pam_winbind"
 #define PAM_SM_AUTH
 #include <libintl.h>
 #endif
 
-#ifndef LINUX
+#if defined(LINUX)
+
+/* newer versions of PAM have this in _pam_compat.h */
+#ifndef PAM_AUTHTOK_RECOVERY_ERR
+#define PAM_AUTHTOK_RECOVERY_ERR PAM_AUTHTOK_RECOVER_ERR
+#endif
+
+#else /* !LINUX */
 
 /* Solaris always uses dynamic pam modules */
 #define PAM_EXTERN extern
@@ -164,6 +170,8 @@ struct pwb_context {
        uint32_t ctrl;
 };
 
-#define TALLOC_FREE(ctx) do { if ((ctx) != NULL) {talloc_free(ctx); ctx=NULL;} } while(0)
+#ifndef TALLOC_FREE
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)