Patch from  Igor Khavkine <i_khavki@alcor.concordia.ca>Patch from
Debian bug #76119

Index: Linux-PAM/configure.in
===================================================================
--- Linux-PAM/configure.in	(revision 378)
+++ Linux-PAM/configure.in	(working copy)
@@ -246,7 +246,7 @@
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h sys/fsuid.h)
+AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h net/if.h termios.h unistd.h sys/fsuid.h)
 
 dnl Linux wants features.h in some of the source files.
 AC_CHECK_HEADERS(features.h)
Index: Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c
===================================================================
--- Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c	(revision 378)
+++ Linux-PAM/modules/pam_rhosts/pam_rhosts_auth.c	(working copy)
@@ -51,7 +51,7 @@
 #endif /* HAVE_SYS_FSUID_H */
 
 #ifdef HAVE_NET_IF_H
-#include <sys/if.h>
+#include <net/if.h>
 #endif
 
 #include <sys/types.h>
@@ -77,8 +77,6 @@
 #include <stdarg.h>
 #include <ctype.h>
 
-#include <net/if.h>
-
 #include <pwd.h>
 #include <grp.h>
 #include <sys/file.h>
Index: Linux-PAM/modules/pam_limits/pam_limits.c
===================================================================
--- Linux-PAM/modules/pam_limits/pam_limits.c	(revision 382)
+++ Linux-PAM/modules/pam_limits/pam_limits.c	(working copy)
@@ -296,8 +296,10 @@
 	limit_item = RLIMIT_NOFILE;
     else if (strcmp(lim_item, "memlock") == 0)
 	limit_item = RLIMIT_MEMLOCK;
+#ifdef RLIMIT_AS
     else if (strcmp(lim_item, "as") == 0)
 	limit_item = RLIMIT_AS;
+#endif /*RLIMIT_AS*/
 #ifdef RLIMIT_LOCKS
     else if (strcmp(lim_item, "locks") == 0)
 	limit_item = RLIMIT_LOCKS;
@@ -395,7 +397,9 @@
         case RLIMIT_CORE:
         case RLIMIT_RSS:
         case RLIMIT_MEMLOCK:
+#ifdef RLIMIT_AS
         case RLIMIT_AS:
+#endif
          if (rlimit_value != RLIM_INFINITY)
             rlimit_value *= 1024;
     	 break;
Index: Linux-PAM/_pam_aconf.h.in
===================================================================
--- Linux-PAM/_pam_aconf.h.in	(revision 378)
+++ Linux-PAM/_pam_aconf.h.in	(working copy)
@@ -15,6 +15,8 @@
 
 /* provide a global locking facility within libpam */
 #undef PAM_LOCKING
+#undef HAVE_TERMIOS_H
+#undef HAVE_NET_IF_H
 
 /* GNU systems as a class, all have the feature.h file */
 #undef HAVE_FEATURES_H
