* [PATCH] libxl: portibility fixes
@ 2010-07-20 14:34 Christoph Egger
0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2010-07-20 14:34 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
Hi!
Attached patch takes over some portability fixes from tools/console
to make libxl build on NetBSD.
blktapctl is build on Linux only. This will be another patch to finally
unbreak libxl.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_tools_libxl.diff --]
[-- Type: text/x-diff, Size: 1914 bytes --]
diff -r bc0fe7d0f309 tools/Rules.mk
--- a/tools/Rules.mk Tue Jul 20 12:20:00 2010 +0200
+++ b/tools/Rules.mk Tue Jul 20 16:31:31 2010 +0200
@@ -26,8 +26,13 @@ LDFLAGS_libxenguest = -L$(XEN_LIBXC) -lx
CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_include)
LDFLAGS_libxenstore = -L$(XEN_XENSTORE) -lxenstore
+ifeq ($(CONFIG_Linux),y)
CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_include)
LDFLAGS_libblktapctl = -L$(XEN_BLKTAP2)/control -lblktapctl
+else
+CFLAGS_libblktapctl =
+LDFLAGS_libblktapctl =
+endif
X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
diff -r bc0fe7d0f309 tools/libxl/Makefile
--- a/tools/libxl/Makefile Tue Jul 20 12:20:00 2010 +0200
+++ b/tools/libxl/Makefile Tue Jul 20 16:31:31 2010 +0200
@@ -15,7 +15,7 @@ CFLAGS += -Werror -Wno-format-zero-lengt
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_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o $(LIBXL_OBJS-y)
diff -r bc0fe7d0f309 tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c Tue Jul 20 12:20:00 2010 +0200
+++ b/tools/libxl/libxl_bootloader.c Tue Jul 20 16:31:31 2010 +0200
@@ -15,9 +15,16 @@
#include "libxl_osdeps.h"
#include <string.h>
-#include <pty.h>
#include <unistd.h>
#include <fcntl.h>
+#include <termios.h>
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+#include <util.h>
+#elif defined(__linux__)
+#include <pty.h>
+#elif defined(__sun__)
+#include <stropts.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-20 14:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 14:34 [PATCH] libxl: portibility fixes Christoph Egger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).