diff options
author | Ross Paterson <ross@soi.city.ac.uk> | 2011-06-29 18:58:04 +0100 |
---|---|---|
committer | Ross Paterson <ross@soi.city.ac.uk> | 2011-06-29 18:58:04 +0100 |
commit | ccbd92a265c98ab1119adfe83f0cd5c595fe7a59 (patch) | |
tree | dd2362ae8dd78862009441d9a62bc915ca19149c | |
parent | 5f3e4b478e1b84a23086f04c97a8fd6ea258de2e (diff) |
prefer bsd/libutil.h (if available) to libutil.h
libutil.h is deprecated in recent releases of libbsd
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | include/HsUnix.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 346e1e1..1b65cf4 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_SYS_LARGEFILE AC_CHECK_HEADERS([dirent.h fcntl.h grp.h limits.h pwd.h signal.h string.h]) AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/times.h sys/time.h]) AC_CHECK_HEADERS([sys/utsname.h sys/wait.h]) -AC_CHECK_HEADERS([libutil.h pty.h utmp.h]) +AC_CHECK_HEADERS([bsd/libutil.h libutil.h pty.h utmp.h]) AC_CHECK_HEADERS([termios.h time.h unistd.h utime.h]) AC_CHECK_FUNCS([getgrgid_r getgrnam_r getpwnam_r getpwuid_r getpwnam getpwuid]) diff --git a/include/HsUnix.h b/include/HsUnix.h index cb8d466..d8a072a 100644 --- a/include/HsUnix.h +++ b/include/HsUnix.h @@ -75,7 +75,9 @@ #include <dirent.h> #endif -#ifdef HAVE_LIBUTIL_H +#if defined(HAVE_BSD_LIBUTIL_H) +#include <bsd/libutil.h> +#elif defined(HAVE_LIBUTIL_H) #include <libutil.h> #endif #ifdef HAVE_PTY_H |