diff options
author | Niclas Zeising <zeising@daemonic.se> | 2013-01-16 01:30:20 +0100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-19 08:47:32 -0800 |
commit | 2831823f608c1906211d5c55a098f48c8fad1a37 (patch) | |
tree | d452405428468f1de424e41f99be5e2d75c3537e | |
parent | cc0cf84461cfe2c31ddce34863c6433183e8a55d (diff) |
Fix build on FreeBSD
libutil.h is needed on FreeBSD to get the definition of openpty(), add a
configure check for this include, and include it in xconsole.c if it
exists.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | xconsole.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index de16a6a..567dccf 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ AC_CHECK_FUNC(openpty, [HAS_OPENPTY="yes"]) if test "x$HAS_OPENPTY" = "xyes" ; then AC_DEFINE([HAS_OPENPTY], 1, [Define to 1 if you have the 'openpty' function.]) - AC_CHECK_HEADERS([util.h pty.h], [break]) + AC_CHECK_HEADERS([util.h libutil.h pty.h], [break]) fi @@ -69,6 +69,9 @@ extern char *_XawTextGetSTRING(TextWidget ctx, XawTextPosition left, # ifdef HAVE_UTIL_H # include <util.h> # endif +# ifdef HAVE_LIBUTIL_H +# include <libutil.h> +# endif # ifdef HAVE_PTY_H # include <pty.h> # endif |