]> granicus.if.org Git - sudo/commitdiff
FreeBSD has libutil.h not util.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Sep 2011 13:52:33 +0000 (09:52 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Sep 2011 13:52:33 +0000 (09:52 -0400)
config.h.in
configure
configure.in
src/get_pty.c

index c49bb5e3e83fef1dcf8556a89b9aced7df7a3c1b..7a9c248adcf534930d91f456598a76dc72b5e2c1 100644 (file)
 /* Define to 1 if you have the <libintl.h> header file. */
 #undef HAVE_LIBINTL_H
 
+/* Define to 1 if you have the <libutil.h> header file. */
+#undef HAVE_LIBUTIL_H
+
 /* Define to 1 to enable Linux audit support. */
 #undef HAVE_LINUX_AUDIT
 
index 02dbe679cfb47c492d06234bf3baec15d5af5533..a047164d473bce8a3e496f04c12a691a68e9b393 100755 (executable)
--- a/configure
+++ b/configure
@@ -16345,7 +16345,7 @@ if test "x$ac_cv_func_openpty" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_OPENPTY 1
 _ACEOF
- for ac_header in util.h pty.h
+ for ac_header in libutil.h util.h pty.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -16398,7 +16398,7 @@ fi
 $as_echo "$ac_cv_lib_util_openpty" >&6; }
 if test "x$ac_cv_lib_util_openpty" = xyes; then :
 
-       for ac_header in util.h pty.h
+       for ac_header in libutil.h util.h pty.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
index a62c9a7f7863227725e1f2c6c5465b330ef35fbd..0f278a896bf3f24c31e7d11f6fba347a7067b700 100644 (file)
@@ -2086,9 +2086,9 @@ if test "$utmp_style" = "LEGACY"; then
     AC_CHECK_FUNCS(getttyent ttyslot, [break])
 fi
 
-AC_CHECK_FUNCS(openpty, [AC_CHECK_HEADERS(util.h pty.h, [break])], [
+AC_CHECK_FUNCS(openpty, [AC_CHECK_HEADERS(libutil.h util.h pty.h, [break])], [
     AC_CHECK_LIB(util, openpty, [
-       AC_CHECK_HEADERS(util.h pty.h, [break])
+       AC_CHECK_HEADERS(libutil.h util.h pty.h, [break])
        case "$SUDO_LIBS" in
            *-lutil*) ;;
            *) SUDO_LIBS="${SUDO_LIBS} -lutil";;
index 4bac6b931b87c45d4b6c8e1bb058a9969e1dfc6a..f303721d2d391599e89989d1eb97517f0e6156dc 100644 (file)
@@ -46,7 +46,9 @@
 #include <grp.h>
 #include <pwd.h>
 
-#ifdef HAVE_UTIL_H
+#if defined(HAVE_LIBUTIL_H)
+# include <libutil.h>
+#elif defined(HAVE_UTIL_H)
 # include <util.h>
 #endif
 #ifdef HAVE_PTY_H