- Portability fixes for Irix 5.3 (now compiles OK!)
 - autoconf and other misc cleanups
diff --git a/md5crypt.c b/md5crypt.c
index 15af422..16bcf33 100644
--- a/md5crypt.c
+++ b/md5crypt.c
@@ -17,7 +17,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_MD5_PASSWORDS
+#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
 
 #include <unistd.h>
 #include <string.h>
@@ -163,4 +163,4 @@
 	return passwd;
 }
 
-#endif  /* HAVE_MD5_PASSWORDS */
+#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */