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

[Xen-changelog] [xen-unstable] libxc: portability fixes for NetBSD



# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1294334786 0
# Node ID 5d78193d67d171ea2791ec813cab6398c88364f5
# Parent  6874a9d26fd98661a0806d5de8333b30199d6d5e
libxc: portability fixes for NetBSD

Attached patch makes libxc build again on NetBSD after the recent rework.

[ Modified by iwj:

I changed the name of the new make variable from LIBDL to DLOPEN_LIBS.
The latter conforms to the naming scheme for similar variables found
in config/*.mk - PTHREAD_LIBS et al.

Also I moved the setting of the variable to -dl from Linux to StdGNU
(which makes it apply more widely) and also added it to SunOS.mk
(based on pure guesswork). ]

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 config/NetBSD.mk        |    2 ++
 config/StdGNU.mk        |    2 ++
 config/SunOS.mk         |    2 ++
 tools/libxc/Makefile    |    2 +-
 tools/libxc/xc_netbsd.c |    4 ++--
 5 files changed, 9 insertions(+), 3 deletions(-)

diff -r 6874a9d26fd9 -r 5d78193d67d1 config/NetBSD.mk
--- a/config/NetBSD.mk  Thu Jan 06 14:27:33 2011 +0000
+++ b/config/NetBSD.mk  Thu Jan 06 17:26:26 2011 +0000
@@ -7,6 +7,8 @@ LIBEXEC = $(PREFIX)/libexec
 LIBEXEC = $(PREFIX)/libexec
 PRIVATE_BINDIR = $(BINDIR)
 
+DLOPEN_LIBS =
+
 ifeq ($(PREFIX),/usr)
 XEN_LOCK_DIR = /var/lib
 else
diff -r 6874a9d26fd9 -r 5d78193d67d1 config/StdGNU.mk
--- a/config/StdGNU.mk  Thu Jan 06 14:27:33 2011 +0000
+++ b/config/StdGNU.mk  Thu Jan 06 17:26:26 2011 +0000
@@ -60,6 +60,8 @@ CURSES_LIBS = -lncurses
 CURSES_LIBS = -lncurses
 PTHREAD_LIBS = -lpthread
 UTIL_LIBS = -lutil
+DLOPEN_LIBS = -ldl
+
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
 
diff -r 6874a9d26fd9 -r 5d78193d67d1 config/SunOS.mk
--- a/config/SunOS.mk   Thu Jan 06 14:27:33 2011 +0000
+++ b/config/SunOS.mk   Thu Jan 06 17:26:26 2011 +0000
@@ -50,6 +50,8 @@ CURSES_LIBS = -lcurses
 CURSES_LIBS = -lcurses
 PTHREAD_LIBS = -lpthread
 UTIL_LIBS =
+DLOPEN_LIBS = -ldl
+
 SONAME_LDFLAG = -h
 SHLIB_LDFLAGS = -R $(SunOS_LIBDIR) -shared
 
diff -r 6874a9d26fd9 -r 5d78193d67d1 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Thu Jan 06 14:27:33 2011 +0000
+++ b/tools/libxc/Makefile      Thu Jan 06 17:26:26 2011 +0000
@@ -158,7 +158,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(
        ln -sf $< $@
 
 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenctrl.so.$(MAJOR) -ldl $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenctrl.so.$(MAJOR) $(DLOPEN_LIBS) $(SHLIB_LDFLAGS) -o $@ $^ 
$(PTHREAD_LIBS)
 
 # libxenguest
 
diff -r 6874a9d26fd9 -r 5d78193d67d1 tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c   Thu Jan 06 14:27:33 2011 +0000
+++ b/tools/libxc/xc_netbsd.c   Thu Jan 06 17:26:26 2011 +0000
@@ -51,7 +51,7 @@ static xc_osdep_handle netbsd_privcmd_op
         goto error;
     }
 
-    return (xc_osinteface_handle)fd;
+    return (xc_osdep_handle)fd;
 
  error:
     saved_errno = errno;
@@ -181,7 +181,7 @@ static struct xc_osdep_ops netbsd_privcm
     .close = &netbsd_privcmd_close,
 
     .u.privcmd = {
-        .hypercall = &netbsd_privcmd_hypercall;
+        .hypercall = &netbsd_privcmd_hypercall,
 
         .map_foreign_batch = &netbsd_privcmd_map_foreign_batch,
         .map_foreign_bulk = &xc_map_foreign_bulk_compat,

_______________________________________________
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®.