diff --git a/configure.ac b/configure.ac index 810f96caa..cbcf9d077 100644 --- a/configure.ac +++ b/configure.ac @@ -388,12 +388,12 @@ AC_CHECK_HEADERS([ \ stdint.h \ string.h \ strings.h \ - sys/audit.h \ sys/bitypes.h \ sys/bsdtty.h \ sys/cdefs.h \ sys/dir.h \ sys/mman.h \ + sys/label.h \ sys/ndir.h \ sys/poll.h \ sys/prctl.h \ @@ -422,6 +422,20 @@ AC_CHECK_HEADERS([ \ wchar.h \ ]) +# On some platforms (eg SunOS4) sys/audit.h requires sys/[time|types|label.h] +# to be included first. +AC_CHECK_HEADERS([sys/audit.h], [], [], [ +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_LABEL_H +# include +#endif +]) + # sys/capsicum.h requires sys/types.h AC_CHECK_HEADERS([sys/capsicum.h], [], [], [ #ifdef HAVE_SYS_TYPES_H