$NetBSD$
--- xtrlock.c.orig	2007-03-28 07:24:00.000000000 +0200
+++ xtrlock.c	2007-03-28 07:27:32.000000000 +0200
@@ -31,11 +31,17 @@
 #include <grp.h>
 #include <limits.h>
 #include <string.h>
-#include <crypt.h>
 #include <unistd.h>
 #include <math.h>
 #include <ctype.h>
+
+#ifdef BSD
+#include <gcrypt.h>
+#include <limits.h>
+#elseif
+#include <crypt.h>
 #include <values.h>
+#endif
 
 #ifdef SHADOW_PWD
 #include <shadow.h>
