[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: Portability fixes for pty handling, in libxl_osdeps.h



# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1280416370 -3600
# Node ID 3477b170e9cbc33294a299455a37ee71bd38b4c8
# Parent  e7a7eec8f2ed543ba26fa34f40743e12ee96b591
libxl: Portability fixes for pty handling, in libxl_osdeps.h

This is the same approach used in tools/console, although we have a
separate instance of it as it is difficult to share code between these
two places.

Also add a missing include of <termios.h>, and fix a literal use of
-lutil to refer to UTIL_LIBS.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/Makefile           |    2 +-
 tools/libxl/libxl_bootloader.c |    2 +-
 tools/libxl/libxl_osdeps.h     |    8 ++++++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff -r e7a7eec8f2ed -r 3477b170e9cb tools/libxl/Makefile
--- a/tools/libxl/Makefile      Thu Jul 29 15:56:13 2010 +0100
+++ b/tools/libxl/Makefile      Thu Jul 29 16:12:50 2010 +0100
@@ -15,7 +15,7 @@ CFLAGS += -I. -fPIC
 CFLAGS += -I. -fPIC
 CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) 
$(CFLAGS_libblktapctl)
 
-LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore) 
$(LDFLAGS_libblktapctl) -lutil
+LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore) 
$(LDFLAGS_libblktapctl) $(UTIL_LIBS)
 
 LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o
 LIBXL_OBJS = flexarray.o libxl.o libxl_pci.o libxl_dom.o libxl_exec.o 
libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o 
$(LIBXL_OBJS-y)
diff -r e7a7eec8f2ed -r 3477b170e9cb tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c    Thu Jul 29 15:56:13 2010 +0100
+++ b/tools/libxl/libxl_bootloader.c    Thu Jul 29 16:12:50 2010 +0100
@@ -15,9 +15,9 @@
 #include "libxl_osdeps.h"
 
 #include <string.h>
-#include <pty.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <termios.h>
 
 #include <sys/stat.h>
 #include <sys/types.h>
diff -r e7a7eec8f2ed -r 3477b170e9cb tools/libxl/libxl_osdeps.h
--- a/tools/libxl/libxl_osdeps.h        Thu Jul 29 15:56:13 2010 +0100
+++ b/tools/libxl/libxl_osdeps.h        Thu Jul 29 16:12:50 2010 +0100
@@ -23,6 +23,14 @@
 
 #define _GNU_SOURCE
 
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <util.h>
+#elif defined(__linux__)
+#include <pty.h>
+#elif defined(__sun__)
+#include <stropts.h>
+#endif
+
 #ifdef NEED_OWN_ASPRINTF
 #include <stdarg.h>
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.