ia64/xen-unstable

changeset 16034:1a04c799e20e

Fix non-portabilities in libflask.
Signed-off-by: John Levon <john.levon@sun.com>
author Keir Fraser <keir@xensource.com>
date Tue Oct 02 09:29:00 2007 +0100 (2007-10-02)
parents 74e385194be4
children fe94b7818c4e
files tools/flask/libflask/Makefile tools/flask/libflask/include/flask_op.h tools/flask/loadpolicy/Makefile
line diff
     1.1 --- a/tools/flask/libflask/Makefile	Tue Oct 02 09:27:22 2007 +0100
     1.2 +++ b/tools/flask/libflask/Makefile	Tue Oct 02 09:29:00 2007 +0100
     1.3 @@ -60,6 +60,6 @@ libflask.so.$(MAJOR): libflask.so.$(MAJO
     1.4  	ln -sf $< $@
     1.5  
     1.6  libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
     1.7 -	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libflask.so.$(MAJOR) -shared -o $@ $^
     1.8 +	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
     1.9  
    1.10  -include $(DEPS)
     2.1 --- a/tools/flask/libflask/include/flask_op.h	Tue Oct 02 09:27:22 2007 +0100
     2.2 +++ b/tools/flask/libflask/include/flask_op.h	Tue Oct 02 09:29:00 2007 +0100
     2.3 @@ -39,7 +39,7 @@ typedef struct flask_op {
     2.4  } flask_op_t;
     2.5  
     2.6  int flask_load(int xc_handle, char *buf, int size);
     2.7 -int flask_context_to_sid(int xc_handle, char *buf, int size, u_int32_t *sid);
     2.8 +int flask_context_to_sid(int xc_handle, char *buf, int size, uint32_t *sid);
     2.9  int flask_sid_to_context(int xc_handle, int sid, char *buf, int size);
    2.10  int do_flask_op(int xc_handle, flask_op_t *op);
    2.11  
     3.1 --- a/tools/flask/loadpolicy/Makefile	Tue Oct 02 09:27:22 2007 +0100
     3.2 +++ b/tools/flask/loadpolicy/Makefile	Tue Oct 02 09:29:00 2007 +0100
     3.3 @@ -2,11 +2,6 @@ XEN_ROOT=../../..
     3.4  include $(XEN_ROOT)/tools/Rules.mk
     3.5  XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
     3.6  
     3.7 -INSTALL         = install
     3.8 -INSTALL_DATA    = $(INSTALL) -m0644
     3.9 -INSTALL_PROG    = $(INSTALL) -m0755
    3.10 -INSTALL_DIR     = $(INSTALL) -d -m0755
    3.11 -
    3.12  LIBXC_ROOT = $(XEN_ROOT)/tools/libxc
    3.13  LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask
    3.14  
    3.15 @@ -28,13 +23,17 @@ TESTFLAGS= -DTESTING
    3.16  TESTENV  = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR)
    3.17  
    3.18  CLIENTS := flask-loadpolicy
    3.19 +CLIENTS_SRCS := $(patsubst flask-%,%.c,$(CLIENTS))
    3.20  CLIENTS_OBJS := $(patsubst flask-%,%.o,$(CLIENTS))
    3.21  
    3.22  .PHONY: all
    3.23  all: $(CLIENTS)
    3.24  
    3.25  $(CLIENTS): flask-%: %.o
    3.26 -	$(LINK.o) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@
    3.27 +	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) $(LDLIBS) -L. -lflask -lxenctrl -o $@
    3.28 +
    3.29 +$(CLIENTS_OBJS): $(CLIENTS_SRCS)
    3.30 +	$(COMPILE.c) -o $@ $<
    3.31  
    3.32  .PHONY: clean
    3.33  clean: