diff options
author | Christoph Egger <Christoph.Egger@amd.com> | 2011-01-06 17:26:26 +0000 |
---|---|---|
committer | Christoph Egger <Christoph.Egger@amd.com> | 2011-01-06 17:26:26 +0000 |
commit | f1223b4eec9bc25265a4f50c423c60462681ead8 (patch) | |
tree | 83a0a004b34550ca63ec62005b1f860d41477bdb | |
parent | 7e600e448519040d4857d291ddc8f34277d2c67e (diff) | |
download | xen-f1223b4eec9bc25265a4f50c423c60462681ead8.tar.gz xen-f1223b4eec9bc25265a4f50c423c60462681ead8.tar.bz2 xen-f1223b4eec9bc25265a4f50c423c60462681ead8.zip |
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@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | config/NetBSD.mk | 2 | ||||
-rw-r--r-- | config/StdGNU.mk | 2 | ||||
-rw-r--r-- | config/SunOS.mk | 2 | ||||
-rw-r--r-- | tools/libxc/Makefile | 2 | ||||
-rw-r--r-- | tools/libxc/xc_netbsd.c | 4 |
5 files changed, 9 insertions, 3 deletions
diff --git a/config/NetBSD.mk b/config/NetBSD.mk index 6245259761..7aed0e7440 100644 --- a/config/NetBSD.mk +++ b/config/NetBSD.mk @@ -7,6 +7,8 @@ LIBLEAFDIR_x86_64 = lib LIBEXEC = $(PREFIX)/libexec PRIVATE_BINDIR = $(BINDIR) +DLOPEN_LIBS = + ifeq ($(PREFIX),/usr) XEN_LOCK_DIR = /var/lib else diff --git a/config/StdGNU.mk b/config/StdGNU.mk index 0b1e0382d6..f27bdc59f5 100644 --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -60,6 +60,8 @@ SOCKET_LIBS = CURSES_LIBS = -lncurses PTHREAD_LIBS = -lpthread UTIL_LIBS = -lutil +DLOPEN_LIBS = -ldl + SONAME_LDFLAG = -soname SHLIB_LDFLAGS = -shared diff --git a/config/SunOS.mk b/config/SunOS.mk index 80a392bcae..6fa0e817dd 100644 --- a/config/SunOS.mk +++ b/config/SunOS.mk @@ -50,6 +50,8 @@ SOCKET_LIBS = -lsocket CURSES_LIBS = -lcurses PTHREAD_LIBS = -lpthread UTIL_LIBS = +DLOPEN_LIBS = -ldl + SONAME_LDFLAG = -h SHLIB_LDFLAGS = -R $(SunOS_LIBDIR) -shared diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index a99f5c7e4c..e042be7ea0 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -158,7 +158,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR) 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 --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c index 117acedc67..8c82e36645 100644 --- a/tools/libxc/xc_netbsd.c +++ b/tools/libxc/xc_netbsd.c @@ -51,7 +51,7 @@ static xc_osdep_handle netbsd_privcmd_open(xc_interface *xch) 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_privcmd_ops = { .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, |