]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: fix build on platforms without ptsname_r
authorEric Blake <eblake@redhat.com>
Thu, 3 Nov 2011 20:56:13 +0000 (14:56 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 7 Nov 2011 16:34:02 +0000 (09:34 -0700)
commitf7bd00c12cace027083d6c46818aa2147e479bca
tree991543a69d8043bf1d26eedb522335bd0bbadfb2
parent07bf96ee3f807900dd15859ab98b3487f48d40a1
build: fix build on platforms without ptsname_r

MacOS lacks ptsname_r, and gnulib doesn't (yet) provide it.
But we can avoid it altogether, by using gnulib openpty()
instead.  Note that we do _not_ want the pt_chown module;
gnulib uses it only to implement a replacement openpty() if
the system lacks both openpty() and granpt(), but all
systems that we currently port to either have at least one of
openpty() and/or grantpt(), or lack ptys altogether.  That is,
we aren't porting to any system that requires us to deal with
the hassle of installing a setuid pt_chown helper just to use
gnulib's ability to provide openpty() on obscure platforms.

* .gnulib: Update to latest, for openpty fixes
* bootstrap.conf (gnulib_modules): Add openpty, ttyname_r.
(gnulib_tool_option_extras): Exclude pt_chown module.
* src/util/util.c (virFileOpenTty): Rewrite in terms of openpty
and ttyname_r.
* src/util/util.h (virFileOpenTtyAt): Delete dead prototype.
.gnulib
bootstrap.conf
src/util/util.c
src/util/util.h