mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Currently if someone changes the date on the host, xenconsoled may behave incorrectly due to the use of gettimeofday for the rate control algorithm. For example I was able to hang the console connected to a guest just setting the date forward 20 years. To solve the problem we need to use a time source that doesn't change start point, that is clock_gettime with CLOCK_MONOTONIC. The only bad side effect is that it introduces a dependency to librt, but I think is well worth it. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
36 lines
843 B
Makefile
36 lines
843 B
Makefile
|
|
XEN_ROOT=../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
|
|
CFLAGS += $(CFLAGS_libxenctrl)
|
|
CFLAGS += $(CFLAGS_libxenstore)
|
|
LDFLAGS += $(LDFLAGS_libxenctrl)
|
|
LDFLAGS += $(LDFLAGS_libxenstore)
|
|
|
|
BIN = xenconsoled xenconsole
|
|
|
|
.PHONY: all
|
|
all: $(BIN)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.a *.so *.o *.rpm $(BIN)
|
|
$(RM) client/*.o daemon/*.o
|
|
|
|
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) \
|
|
$(UTIL_LIBS) $(SOCKET_LIBS) -lrt
|
|
|
|
xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) \
|
|
$(UTIL_LIBS) $(SOCKET_LIBS)
|
|
|
|
.PHONY: install
|
|
install: $(BIN)
|
|
$(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
|
|
$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
|
|
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
|
|
$(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
|