Browse Source

Fixed prerequisite headers for sys/buf.h (needed on FreeBSD)

Sergey Poznyakoff 21 years ago
parent
commit
be8899e6aa
2 changed files with 9 additions and 1 deletions
  1. 6 1
      configure.ac
  2. 3 0
      src/system.h

+ 6 - 1
configure.ac

@@ -36,11 +36,16 @@ AC_C_INLINE
 
 AC_CHECK_HEADERS(fcntl.h linux/fd.h memory.h net/errno.h \
   sgtty.h string.h \
-  sys/buf.h sys/device.h sys/gentape.h \
+  sys/param.h sys/device.h sys/gentape.h \
   sys/inet.h sys/io/trioctl.h \
   sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
   unistd.h)
 
+AC_CHECK_HEADERS([sys/buf.h], [], [],
+[#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif])
+
 AC_HEADER_SYS_WAIT
 AM_STDBOOL_H
 

+ 3 - 0
src/system.h

@@ -393,6 +393,9 @@ extern int errno;
 #  if HAVE_SYS_DEVICE_H
 #   include <sys/device.h>
 #  endif
+#  if HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#  endif
 #  if HAVE_SYS_BUF_H
 #   include <sys/buf.h>
 #  endif