# HG changeset patch # User Timo Sirainen # Date 1248645617 14400 # Node ID 48b1f2b7144b7303967e1d061c6fd18f70ddb288 # Parent ea84eb708efc4c34d13490a548b02bcf9e799214 pam: Fixed compiler warning with BSDs. diff -r ea84eb708efc -r 48b1f2b7144b src/auth/passdb-pam.c --- a/src/auth/passdb-pam.c Sun Jul 26 16:32:18 2009 -0400 +++ b/src/auth/passdb-pam.c Sun Jul 26 18:00:17 2009 -0400 @@ -28,19 +28,13 @@ # include #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 +#if defined(sun) || defined(__sun__) || defined(_HPUX_SOURCE) +# define pam_const +#else +# define pam_const const #endif -#ifdef SUNPAM -# define linux_const -#else -# define linux_const const -#endif -typedef linux_const void *pam_item_t; +typedef pam_const void *pam_item_t; #define PASSDB_PAM_DEFAULT_MAX_REQUESTS 100 @@ -62,7 +56,7 @@ }; 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 */