diff -Naur chkrootkit-0.38.orig/Makefile chkrootkit-0.38/Makefile
--- chkrootkit-0.38.orig/Makefile	2002-12-06 03:07:29.000000000 +0100
+++ chkrootkit-0.38/Makefile	2003-01-08 15:16:54.329170000 +0100
@@ -34,31 +34,31 @@
 sense: chklastlog chkwtmp ifpromisc chkproc chkdirs check_wtmpx strings
 
 chklastlog:   chklastlog.c
-	${CC} ${CFLAGS} -o $@ chklastlog.c
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ chklastlog.c ${LIBS}
 	@strip $@
 
 chkwtmp:   chkwtmp.c
-	${CC} ${CFLAGS} -o $@ chkwtmp.c
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ chkwtmp.c ${LIBS}
 	@strip $@
 
 ifpromisc:   ifpromisc.c
-	${CC} ${CFLAGS} ${LDFLAGS} -o $@ ifpromisc.c
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ ifpromisc.c ${LIBS}
 	@strip $@
 
 chkproc:   chkproc.c
-	${CC} ${LDFLAGS} -o $@ chkproc.c
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ chkproc.c ${LIBS}
 	@strip $@
 
 chkdirs:   chkdirs.c
-	${CC} ${LDFLAGS} -o $@ chkdirs.c
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ chkdirs.c ${LIBS}
 	@strip $@
 
 check_wtmpx:   check_wtmpx.c
-	${CC} ${LDFLAGS} -o $@ check_wtmpx.c
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ check_wtmpx.c ${LIBS}
 	@strip $@
 
 strings:   strings.c
-	${CC} ${STATIC} ${LDFLAGS} -o $@ strings.c
+	${CC} ${STATIC} ${CFLAGS} ${LDFLAGS} -o $@ strings.c ${LIBS}
 	@strip $@
 
 clean:
diff -Naur chkrootkit-0.38.orig/chkdirs.c chkrootkit-0.38/chkdirs.c
--- chkrootkit-0.38.orig/chkdirs.c	2002-12-21 00:40:20.000000000 +0100
+++ chkrootkit-0.38/chkdirs.c	2003-01-08 15:43:52.518334000 +0100
@@ -32,6 +32,14 @@
 #include <string.h>
 #include <errno.h>
 
+#ifndef NAME_MAX
+#define NAME_MAX 14
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
 struct dirinfolist {
   char                   dil_name[NAME_MAX+1];
   int                    dil_lc;
