]> granicus.if.org Git - sudo/commitdiff
Include sys/mkdev.h if present instead of sys/sysmacros.h for
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 16 Apr 2012 14:18:32 +0000 (10:18 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 16 Apr 2012 14:18:32 +0000 (10:18 -0400)
minor().  This is needed on Solaris (at least) where the makedev
macros in sysmacros.h are obsolete and library functions should be
used instead.

config.h.in
configure
configure.in
src/ttyname.c

index 8df0ad37569701630e7b50d7a7ed5f0e7adc7687..28661f9aef4819500d3ff38a44bbfca947d2cc2a 100644 (file)
    */
 #undef HAVE_SYS_DIR_H
 
+/* Define to 1 if you have the <sys/mkdev.h> header file. */
+#undef HAVE_SYS_MKDEV_H
+
 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
    */
 #undef HAVE_SYS_NDIR_H
index 771a364405023426ac5123db5f432477fd811911..3a54f68af017508d7965680429e3459abf2d9f5f 100755 (executable)
--- a/configure
+++ b/configure
@@ -15235,7 +15235,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 
 fi
 
-for ac_header in malloc.h netgroup.h paths.h spawn.h utime.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h
+for ac_header in malloc.h netgroup.h paths.h spawn.h utime.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/mkdev.h sys/select.h sys/stropts.h sys/sysmacros.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 bb6c2c54e479f012ea69d81ad275a16de6334ef7..ff6cf442c9e6ba96e7a37af7cefaa4b8cdfb3f99 100644 (file)
@@ -2006,7 +2006,7 @@ AC_HEADER_STDC
 AC_HEADER_DIRENT
 AC_HEADER_TIME
 AC_HEADER_STDBOOL
-AC_CHECK_HEADERS(malloc.h netgroup.h paths.h spawn.h utime.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h)
+AC_CHECK_HEADERS(malloc.h netgroup.h paths.h spawn.h utime.h utmpx.h sys/sockio.h sys/bsdtypes.h sys/mkdev.h sys/select.h sys/stropts.h sys/sysmacros.h)
 AC_CHECK_HEADERS([procfs.h] [sys/procfs.h], [AC_CHECK_MEMBERS(struct psinfo.pr_ttydev, [AC_CHECK_FUNCS(_ttyname_dev)], [], [AC_INCLUDES_DEFAULT
 #ifdef HAVE_PROCFS_H
 #include <procfs.h>
index 2730a69e2a42592b59ad4cfdde0c8a4018a780c6..cb8c8cfa579a495227214674a78966f4af9c0c6d 100644 (file)
@@ -25,7 +25,9 @@
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
-#ifdef HAVE_SYS_SYSMACROS_H
+#if defined(HAVE_SYS_MKDEV_H)
+# include <sys/mkdev.h>
+#elif defined(HAVE_SYS_SYSMACROS_H)
 # include <sys/sysmacros.h>
 #endif
 #include <stdio.h>