diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-01-12 07:01:21 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-01-12 07:01:21 +0000 |
commit | 60e8e9aabcca4188e5ad2d0b5c8a448bd0c4437e (patch) | |
tree | 82019c4d2c4765199242e8143f414e6d51c9e1b0 /tools/blktap | |
parent | b57e4ee13e4b950ca5d75db23eb19789f19220d3 (diff) | |
download | xen-60e8e9aabcca4188e5ad2d0b5c8a448bd0c4437e.tar.gz xen-60e8e9aabcca4188e5ad2d0b5c8a448bd0c4437e.tar.bz2 xen-60e8e9aabcca4188e5ad2d0b5c8a448bd0c4437e.zip |
blktap: make memshr optional
Attached patch makes memshr optional for blktap/blktap2.
This fixes build for platforms where memshr isn't build on.
While there, make indentation consistent.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'tools/blktap')
-rw-r--r-- | tools/blktap/drivers/Makefile | 8 | ||||
-rw-r--r-- | tools/blktap/drivers/blktapctrl.c | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tools/blktap/drivers/Makefile b/tools/blktap/drivers/Makefile index b7e392b3d8..ed6fcbe6f7 100644 --- a/tools/blktap/drivers/Makefile +++ b/tools/blktap/drivers/Makefile @@ -23,7 +23,13 @@ CRYPT_LIB := -lcrypto $(warning === libgcrypt not installed: falling back to libcrypto ===) endif -LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHR_DIR)/libmemshr.a -L../lib -lblktap -lrt -lm +MEMSHRLIBS := +ifeq ($(CONFIG_Linux), y) +CFLAGS += -DMEMSHR +MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a +endif + +LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) $(MEMSHRLIBS) -L../lib -lblktap -lrt -lm LDFLAGS_img := $(LIBAIO_DIR)/libaio.a $(CRYPT_LIB) -lpthread -lz BLK-OBJS-y := block-aio.o diff --git a/tools/blktap/drivers/blktapctrl.c b/tools/blktap/drivers/blktapctrl.c index b5ebfee62e..d1bc79f303 100644 --- a/tools/blktap/drivers/blktapctrl.c +++ b/tools/blktap/drivers/blktapctrl.c @@ -859,7 +859,9 @@ int main(int argc, char *argv[]) goto open_failed; } - memshr_daemon_initialize(); +#ifdef MEMSHR + memshr_daemon_initialize(); +#endif retry: /* Set up store connection and watch. */ |