From: Ben Hutchings <ben@decadent.org.uk>
Subject: [PATCH] Remove FreeBSD dependencies

--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,13 @@ PROG=	ministat
 
 LIBADD=	m
 
-.include <bsd.prog.mk>
+.CURDIR = $(CURDIR)
+
+$(PROG): $(PROG).c
+	$(CC) -o $@ $(CFLAGS) -Wall $< $(LDFLAGS) $(patsubst %,-l%,$(LIBADD))
+
+clean:
+	rm -f $(PROG)
 
 test:	${PROG}
 	./${PROG} < ${.CURDIR}/chameleon
--- a/ministat.c
+++ b/ministat.c
@@ -8,9 +8,6 @@
  *
  */
 
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
 #include <stdio.h>
 #include <math.h>
 #include <ctype.h>
@@ -20,7 +17,6 @@ __FBSDID("$FreeBSD$");
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <sys/queue.h>
-#include <sys/ttycom.h>
 
 #define NSTUDENT 100
 #define NCONF 6
