dovecot-1.1: pam: Fixed compiler warning with BSDs.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 27 01:00:36 EEST 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/77420e6715de
changeset: 8328:77420e6715de
user: Timo Sirainen <tss at iki.fi>
date: Sun Jul 26 18:00:17 2009 -0400
description:
pam: Fixed compiler warning with BSDs.
diffstat:
1 file changed, 7 insertions(+), 13 deletions(-)
src/auth/passdb-pam.c | 20 +++++++-------------
diffs (38 lines):
diff -r d2ed3a968ad0 -r 77420e6715de src/auth/passdb-pam.c
--- a/src/auth/passdb-pam.c Sun Jul 26 16:34:33 2009 -0400
+++ b/src/auth/passdb-pam.c Sun Jul 26 18:00:17 2009 -0400
@@ -28,19 +28,13 @@
# include <pam/pam_appl.h>
#endif
-#if !defined(_SECURITY_PAM_APPL_H) && !defined(LINUX_PAM) && !defined(_OPENPAM)
-/* Sun's PAM doesn't use const. we use a bit dirty hack to check it.
- Originally it was just __sun__ check, but HP/UX also uses Sun's PAM
- so I thought this might work better. */
-# define SUNPAM
-#endif
-
-#ifdef SUNPAM
-# define linux_const
+#if defined(sun) || defined(__sun__) || defined(_HPUX_SOURCE)
+# define pam_const
#else
-# define linux_const const
-#endif
-typedef linux_const void *pam_item_t;
+# define pam_const const
+#endif
+
+typedef pam_const void *pam_item_t;
struct pam_passdb_module {
struct passdb_module module;
@@ -59,7 +53,7 @@ struct pam_conv_context {
};
static int
-pam_userpass_conv(int num_msg, linux_const struct pam_message **msg,
+pam_userpass_conv(int num_msg, pam_const struct pam_message **msg,
struct pam_response **resp_r, void *appdata_ptr)
{
/* @UNSAFE */
More information about the dovecot-cvs
mailing list