- NetBSD patch from David Rankin <drankin@bohemians.lexington.ky.us> and
   Christos Zoulas <christos@netbsd.org>
diff --git a/defines.h b/defines.h
index 3db1d0d..519ebba 100644
--- a/defines.h
+++ b/defines.h
@@ -34,6 +34,10 @@
 # include <sys/cdefs.h> /* For __P() */
 #endif 
 
+#ifdef HAVE_SYS_SYSMACROS_H
+# include <sys/sysmacros.h> /* For MIN, MAX, etc */
+#endif
+
 /* Constants */
 
 #ifndef SHUT_RDWR