On Fri, Nov 04, 2011 at 08:06:05PM -0600, Eric Blake wrote:
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;
all systems that we currently port to can either properly do
openpty() and/or grantpt(), or lack ptys altogether; we are
not porting to any system that requires us to deal with the
hassle of installing a setuid pt_chown helper just to satisfy
gnulib's ability to provide openpty() on even more 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.
---
Alas, this is just complicated enough that I don't feel comfortable
pushing it under the build-breaker rule, even though I have verified
that it fixes builds on both FreeBSD and Cygwin, as well as still
behaves correctly with LXC containers on Linux. Anyone willing to
give this a review before 0.9.7 gets released?
.gnulib | 2 +-
bootstrap.conf | 3 ++
src/util/util.c | 73 ++++++++++++++++++++++++++++++++++++++++--------------
src/util/util.h | 5 ----
4 files changed, 58 insertions(+), 25 deletions(-)
ACK
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|