diff -u -r openssh-3.3p1-patch/auth2-pam.c openssh-3.3p1-privseppam/auth2-pam.c
--- openssh-3.3p1-patch/auth2-pam.c	Tue Jun 25 10:57:05 2002
+++ openssh-3.3p1-privseppam/auth2-pam.c	Tue Jun 25 11:28:10 2002
@@ -137,7 +137,7 @@
  */
 static int
 sshpam_child_conv(int n,
-	 struct pam_message **msg,
+	 const struct pam_message **msg,
 	 struct pam_response **resp,
 	 void *data)
 {
@@ -190,12 +190,9 @@
 static void *
 sshpam_child(struct sshpam_ctxt *ctxt)
 {
-	struct pam_conv conv; /* = { sshpam_child_conv, ctxt }; */
+	struct pam_conv conv = { sshpam_child_conv, ctxt };
 	pam_handle_t *sshpamh;
 	int err;
-
-	conv.conv = sshpam_child_conv;
-	conv.appdata_ptr = ctxt;
 
 	err = pam_start(SSHD_PAM_SERVICE, ctxt->user, &conv, &sshpamh);
 	if (err != PAM_SUCCESS)
diff -u -r openssh-3.3p1-patch/monitor.c openssh-3.3p1-privseppam/monitor.c
--- openssh-3.3p1-patch/monitor.c	Tue Jun 25 10:45:25 2002
+++ openssh-3.3p1-privseppam/monitor.c	Tue Jun 25 11:28:10 2002
@@ -764,7 +764,7 @@
 int
 mm_answer_sshpam_init_ctx(int socket, Buffer *m)
 {
-	debug3("%s: entering", __func__);
+	debug3("%s: entering", __FUNCTION__);
 
 	if (sshpam_auth_ctxt == NULL)
 		sshpam_auth_ctxt = sshpam_init_ctx(authctxt);
@@ -784,20 +784,20 @@
 	int res;
 
 	if (sshpam_auth_ctxt == NULL)
-		fatal("%s: No PAM kbd-int auth context", __func__);
+		fatal("%s: No PAM kbd-int auth context", __FUNCTION__);
 
 	res = sshpam_query(sshpam_auth_ctxt, &name, &infotxt, &numprompts,
 	    &prompts, &echo_on);
 
 	if (res != -1)
-		debug3("%s: challenge %s", __func__, prompts[0]);
+		debug3("%s: challenge %s", __FUNCTION__, prompts[0]);
 
 	buffer_clear(m);
 	buffer_put_int(m, res);
 	if (res != -1)
 		buffer_put_cstring(m, prompts[0]);
 
-	debug3("%s: sending PAM challenge res: %d", __func__, res);
+	debug3("%s: sending PAM challenge res: %d", __FUNCTION__, res);
 	mm_request_send(socket, MONITOR_ANS_PAMQUERY, m);
 
 	if (res != -1) {
@@ -817,19 +817,19 @@
 	int authok;
 
 	if (sshpam_auth_ctxt == NULL)
-		fatal("%s: No PAM kbd-int auth context", __func__);
+		fatal("%s: No PAM kbd-int auth context", __FUNCTION__);
 
 	response = buffer_get_string(m, NULL);
 	rs[0] = response;
 	
 	authok = sshpam_respond(sshpam_auth_ctxt, 1, rs);
-	debug3("%s: <%s> = <%d>", __func__, response, authok);
+	debug3("%s: <%s> = <%d>", __FUNCTION__, response, authok);
 	xfree(response);
 
 	buffer_clear(m);
 	buffer_put_int(m, authok);
 
-	debug3("%s: sending authenticated: %d", __func__, authok == 0);
+	debug3("%s: sending authenticated: %d", __FUNCTION__, authok == 0);
 	mm_request_send(socket, MONITOR_ANS_PAMRESPOND, m);
 
 	auth_method = "pam";
@@ -844,7 +844,7 @@
 int
 mm_answer_sshpam_free_ctx(int socket, Buffer *m)
 {
-	debug3("%s: entering", __func__);
+	debug3("%s: entering", __FUNCTION__);
 
 	if (sshpam_auth_ctxt != NULL)
 		sshpam_free_ctx(sshpam_auth_ctxt);
diff -u -r openssh-3.3p1-patch/monitor_wrap.c openssh-3.3p1-privseppam/monitor_wrap.c
--- openssh-3.3p1-patch/monitor_wrap.c	Tue Jun 25 10:45:47 2002
+++ openssh-3.3p1-privseppam/monitor_wrap.c	Tue Jun 25 11:28:10 2002
@@ -835,7 +835,7 @@
 {
 	Buffer m;
 
-	debug3("%s: entering", __func__);
+	debug3("%s: entering", __FUNCTION__);
 
 	buffer_init(&m);
 	mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m);
@@ -851,7 +851,7 @@
 	int res;
 	char *challenge;
 
-	debug3("%s: entering", __func__);
+	debug3("%s: entering", __FUNCTION__);
 
 	buffer_init(&m);
 	mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAMQUERY, &m);
@@ -859,7 +859,7 @@
 	mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAMQUERY, &m);
 	res = buffer_get_int(&m);
 	if (res == -1) {
-		debug3("%s: no challenge", __func__);
+		debug3("%s: no challenge", __FUNCTION__);
 		buffer_free(&m);
 		return (-1);
 	}
@@ -868,7 +868,7 @@
 	challenge  = buffer_get_string(&m, NULL);
 	buffer_free(&m);
 
-	debug3("%s: received challenge: %s", __func__, challenge);
+	debug3("%s: received challenge: %s", __FUNCTION__, challenge);
 
 	mm_chall_setup(name, infotxt, numprompts, prompts, echo_on);
 
@@ -883,7 +883,7 @@
 	Buffer m;
 	int authok;
 
-	debug3("%s: entering", __func__);
+	debug3("%s: entering", __FUNCTION__);
 	if (numresponses != 1)
 		return (-1);
 
