Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 lam (7.1.4-1) unstable; urgency=low
 .
   * New upstream release
   * Bug fix: "typo in /etc/lam/lam-helpfile (hreq:timeout should be
     rhreq:timeout)", thanks to Sergio Gelato (Closes: #495182).
     Applied hreq->rhreq in lam-helpfile
   * Bug fix: "Suggest a specific ssh-client and ssh-server in Depends",
     thanks to Adam C Powell IV (Closes: #574002).  Dependencies modified
     to suggest openssh client/server.
Author: Camm Maguire <camm@debian.org>
Bug-Debian: http://bugs.debian.org/495182
Bug-Debian: http://bugs.debian.org/574002

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- lam-7.1.4.orig/configure
+++ lam-7.1.4/configure
@@ -4460,7 +4460,7 @@ cat > conftest.c <<EOF
 extern "C" {
 void exit(int);
 #endif
-int main(int argc, char* argv)
+int main(int argc, char** argv)
 {
     FILE *f=fopen("conftestval", "w");
 #ifndef __STDC__
@@ -7894,7 +7894,7 @@ rm -f conftest.cc conftest.o
 cat > conftest.cc <<EOF
 #include <new>
 
-int main(int argc, char* argv) {
+int main(int argc, char** argv) {
   int *baz;
   unsigned int foo = 3;
   baz = new(std::nothrow) int;
@@ -8006,7 +8006,7 @@ foo<T>::member(int i)
 }
 
 int
-main(int argc, char *argv)
+main(int argc, char **argv)
 {
   foo<bar> var1(6);
   foo< foo<bar> > var2(var1);
@@ -8680,7 +8680,7 @@ cat > conftest.cc <<EOF
 #include <stdio.h>
 #include <sys/types.h>
 
-int main(int argc, char* argv) {
+int main(int argc, char** argv) {
   bool foo = (bool) 0;
   printf("so foo is used and the compiler wont complain: %d", (int) foo);
   return 0;
@@ -8754,7 +8754,7 @@ cat > conftest.cc <<EOF
 #include <stdio.h>
 #include <sys/types.h>
 
-int main(int argc, char* argv) {
+int main(int argc, char** argv) {
   int foo;
   foo = (int) true;
   foo = (int) false;
@@ -22736,7 +22736,7 @@ else
 #include <sys/resource.h>
 #include <unistd.h>
 int
-main(int argc, char* argv)
+main(int argc, char** argv)
 {
   int fd = 0;
   struct rlimit rlp;
@@ -22823,7 +22823,7 @@ else
 #include <sys/select.h>
 #endif
 int
-main(int argc, char* argv)
+main(int argc, char** argv)
 {
   int ret;
   fd_set fds;
@@ -42465,7 +42465,7 @@ int foo(void) { return 1; }
 EOF
     cat > conftest.c <<EOF
 extern int foo(void);
-int main(int argc, char* argv) { return foo(); }
+int main(int argc, char** argv) { return foo(); }
 EOF
 
     ../libtool --mode=compile $CC foo.c -o foo.lo -c > /dev/null 2>&1
--- lam-7.1.4.orig/romio/util/tarch
+++ lam-7.1.4/romio/util/tarch
@@ -94,6 +94,7 @@ for LARCH in $ARCHLIST ; do
         next)            FARCH=NeXT ; break ;;	
 	KSR1|KSR2)       FARCH=ksr ; break ;;	
         FreeBSD)         FARCH=freebsd ; break ;;
+        GNU/kFreeBSD)    FARCH=freebsd ; break ;;
         OpenBSD)         FARCH=openbsd ; break ;;
         NetBSD)          FARCH=netbsd ; break ;;
 	i386)            GARCH=ipsc2 ;;
--- lam-7.1.4.orig/romio/adio/ad_ufs/ad_ufs_wait.c
+++ lam-7.1.4/romio/adio/ad_ufs/ad_ufs_wait.c
@@ -107,7 +107,7 @@ void ADIOI_UFS_ReadComplete(ADIO_Request
 /* DEC, SGI IRIX 5 and 6 */
     if ((*request)->queued) {
 	do {
-	    err = aio_suspend((const aiocb_t **) &((*request)->handle), 1, 0);
+	    err = aio_suspend((const struct aiocb **) &((*request)->handle), 1, 0);
 	} while ((err == -1) && (errno == EINTR));
 
 	if (err != -1) {
--- lam-7.1.4.orig/romio/adio/ad_nfs/ad_nfs_wait.c
+++ lam-7.1.4/romio/adio/ad_nfs/ad_nfs_wait.c
@@ -106,7 +106,7 @@ void ADIOI_NFS_ReadComplete(ADIO_Request
 /* DEC, SGI IRIX 5 and 6 */
     if ((*request)->queued) {
 	do {
-	    err = aio_suspend((const aiocb_t **) &((*request)->handle), 1, 0);
+	    err = aio_suspend((const struct aiocb **) &((*request)->handle), 1, 0);
 	} while ((err == -1) && (errno == EINTR));
 
 	if (err != -1) {
--- lam-7.1.4.orig/etc/lam-helpfile
+++ lam-7.1.4/etc/lam-helpfile
@@ -1943,7 +1943,7 @@ Options:        -h        Print this mes
                 -v        Be verbose
                 -d        Print out lots of debugging messages
 
--*-hreq:timeout-*-
+-*-rhreq:timeout-*-
 # Called when href() doesn't receive any ACKs in a given timeout when
 # it expected to receive some.
 # %1 - string list of nodes that didn't provide an ACK
--- lam-7.1.4.orig/share/memory/Makefile.am
+++ lam-7.1.4/share/memory/Makefile.am
@@ -14,7 +14,7 @@
 
 include $(top_srcdir)/config/Makefile.options
 
-SUBDIRS			= ptmalloc ptmalloc2 darwin7
+SUBDIRS			= ptmalloc ptmalloc2 #darwin7
 
 noinst_LTLIBRARIES	= libmemory.la
 libmemory_la_SOURCES	= memory_hook.c
--- lam-7.1.4.orig/share/memory/Makefile.in
+++ lam-7.1.4/share/memory/Makefile.in
@@ -363,7 +363,7 @@ sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 AUTOMAKE_OPTIONS = foreign dist-bzip2
-SUBDIRS = ptmalloc ptmalloc2 darwin7
+SUBDIRS = ptmalloc ptmalloc2 #darwin7
 noinst_LTLIBRARIES = libmemory.la
 libmemory_la_SOURCES = memory_hook.c
 @LAM_WANT_DARWIN7MALLOC_TRUE@libmemory_la_LIBADD = \
--- lam-7.1.4.orig/share/libltdl/ltdl.c
+++ lam-7.1.4/share/libltdl/ltdl.c
@@ -2183,7 +2183,8 @@ static	int	trim		      LT_PARAMS((char *
 static	int	try_dlopen	      LT_PARAMS((lt_dlhandle *handle,
 						 const char *filename));
 static	int	tryall_dlopen	      LT_PARAMS((lt_dlhandle *handle,
-						 const char *filename));
+						 const char *filename,
+						 const char * useloader));
 static	int	unload_deplibs	      LT_PARAMS((lt_dlhandle handle));
 static	int	lt_argz_insert	      LT_PARAMS((char **pargz,
 						 size_t *pargz_len,
@@ -2369,9 +2370,10 @@ lt_dlexit ()
 }
 
 static int
-tryall_dlopen (handle, filename)
+tryall_dlopen (handle, filename, useloader)
      lt_dlhandle *handle;
      const char *filename;
+     const char *useloader;
 {
   lt_dlhandle	 cur;
   lt_dlloader   *loader;
@@ -2438,6 +2440,11 @@ tryall_dlopen (handle, filename)
 
   while (loader)
     {
+      if (useloader && strcmp(loader->loader_name, useloader))
+	{
+	  loader = loader->next;
+	  continue;
+	}
       lt_user_data data = loader->dlloader_data;
 
       cur->module = loader->module_open (data, filename);
@@ -2507,7 +2514,7 @@ tryall_dlopen_module (handle, prefix, di
       error += tryall_dlopen_module (handle,
 				     (const char *) 0, prefix, filename);
     }
-  else if (tryall_dlopen (handle, filename) != 0)
+  else if (tryall_dlopen (handle, filename, NULL) != 0)
     {
       ++error;
     }
@@ -2528,7 +2535,7 @@ find_module (handle, dir, libdir, dlname
   /* Try to open the old library first; if it was dlpreopened,
      we want the preopened version of it, even if a dlopenable
      module is available.  */
-  if (old_name && tryall_dlopen (handle, old_name) == 0)
+  if (old_name && tryall_dlopen (handle, old_name, "dlpreload") == 0)
     {
       return 0;
     }
@@ -2792,7 +2799,7 @@ find_handle_callback (filename, data, ig
 
   /* Try to dlopen the file, but do not continue searching in any
      case.  */
-  if (tryall_dlopen (handle, filename) != 0)
+  if (tryall_dlopen (handle, filename,NULL) != 0)
     *handle = 0;
 
   return 1;
@@ -3081,7 +3088,7 @@ try_dlopen (phandle, filename)
       /* lt_dlclose()ing yourself is very bad!  Disallow it.  */
       LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG);
 
-      if (tryall_dlopen (&newhandle, 0) != 0)
+      if (tryall_dlopen (&newhandle, 0, NULL) != 0)
 	{
 	  LT_DLFREE (*phandle);
 	  return 1;
@@ -3203,7 +3210,7 @@ try_dlopen (phandle, filename)
 	    }
 #endif
 	}
-      if (!file)
+      else
 	{
 	  file = fopen (filename, LT_READTEXT_MODE);
 	}
@@ -3387,7 +3394,7 @@ try_dlopen (phandle, filename)
 #endif
 		   )))
 	{
-          if (tryall_dlopen (&newhandle, filename) != 0)
+          if (tryall_dlopen (&newhandle, filename, NULL) != 0)
             {
               newhandle = NULL;
             }
