# HG changeset patch # User john.levon@sun.com # Date 1191280053 25200 # Node ID bb3c65b6b6ece12c7c76ae3d8f3ab103932019e5 # Parent 6372695d23e7080ddcd55a030dba77e63675dd4b Fix libflask compile Fix non-portabilities in libflask. Signed-off-by: John Levon <john.levon@sun.com> diff --git a/tools/flask/libflask/Makefile b/tools/flask/libflask/Makefile --- a/tools/flask/libflask/Makefile +++ b/tools/flask/libflask/Makefile @@ -60,6 +60,6 @@ libflask.so.$(MAJOR): libflask.so.$(MAJO ln -sf $< $@ libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libflask.so.$(MAJOR) -shared -o $@ $^ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -include $(DEPS) diff --git a/tools/flask/libflask/include/flask_op.h b/tools/flask/libflask/include/flask_op.h --- a/tools/flask/libflask/include/flask_op.h +++ b/tools/flask/libflask/include/flask_op.h @@ -39,7 +39,7 @@ typedef struct flask_op { } flask_op_t; int flask_load(int xc_handle, char *buf, int size); -int flask_context_to_sid(int xc_handle, char *buf, int size, u_int32_t *sid); +int flask_context_to_sid(int xc_handle, char *buf, int size, uint32_t *sid); int flask_sid_to_context(int xc_handle, int sid, char *buf, int size); int do_flask_op(int xc_handle, flask_op_t *op); diff --git a/tools/flask/loadpolicy/Makefile b/tools/flask/loadpolicy/Makefile --- a/tools/flask/loadpolicy/Makefile +++ b/tools/flask/loadpolicy/Makefile @@ -1,11 +1,6 @@ XEN_ROOT=../../.. XEN_ROOT=../../.. include $(XEN_ROOT)/tools/Rules.mk XEN_LIBXC = $(XEN_ROOT)/tools/libxc - -INSTALL = install -INSTALL_DATA = $(INSTALL) -m0644 -INSTALL_PROG = $(INSTALL) -m0755 -INSTALL_DIR = $(INSTALL) -d -m0755 LIBXC_ROOT = $(XEN_ROOT)/tools/libxc LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask @@ -28,13 +23,17 @@ TESTENV = XENSTORED_ROOTDIR=$(TESTDIR) TESTENV = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR) CLIENTS := flask-loadpolicy +CLIENTS_SRCS := $(patsubst flask-%,%.c,$(CLIENTS)) CLIENTS_OBJS := $(patsubst flask-%,%.o,$(CLIENTS)) .PHONY: all all: $(CLIENTS) $(CLIENTS): flask-%: %.o - $(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@ + +$(CLIENTS_OBJS): $(CLIENTS_SRCS) + $(COMPILE.c) -o $@ $< .PHONY: clean clean: _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel