]> granicus.if.org Git - sudo/commitdiff
FreeBSD has libutil.h not util.h
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Sep 2011 16:34:13 +0000 (12:34 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 21 Sep 2011 16:34:13 +0000 (12:34 -0400)
--HG--
branch : 1.7

config.h.in
configure
configure.in
get_pty.c

index 7f00536a8ace538394d042f409343d6cfb90ac23..8d1e22e53d09a3ded385fa9c0aa17dc66d28e372 100644 (file)
 /* Define to 1 if you have the `dl' library (-ldl). */
 #undef HAVE_LIBDL
 
+/* 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 21d7d900a2a4571015edbdbff2e5f77f6830087b..87f4afb00bcb9d5aea55d07c6845500ff8653065 100755 (executable)
--- a/configure
+++ b/configure
@@ -16197,7 +16197,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"
@@ -16250,7 +16250,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 3342420f15334608e22c571f43217465b7a66294..202040703be405a51c69403bf1d5ba58bdf0bbc9 100644 (file)
@@ -2024,9 +2024,9 @@ AC_CHECK_FUNCS(setsid, [], [
 
 AC_CHECK_FUNCS(sysctl getutxid getutid, [break])
 
-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])
        SUDO_LIBS="${SUDO_LIBS} -lutil"
        AC_DEFINE(HAVE_OPENPTY)
     ], [
index 854979428b8bb10f30a6e4f48820ddc82264251e..0ba75b8405b08ee0afb0747e8b9c5ddc51e1ef32 100644 (file)
--- a/get_pty.c
+++ b/get_pty.c
@@ -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