From: Paul Durrant Date: Tue, 25 Feb 2020 12:33:43 +0000 (+0000) Subject: libxl: fix build with older glibc X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~637 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=37a5b5f673a78f03f8e63f86b98ac89dd13632e1;p=xen.git libxl: fix build with older glibc Commit 2b02882ebbbc "libxl: add infrastructure to track and query 'recent' domids" added a call to clock_gettime() into libxl. The man- page for this states: "Link with -lrt (only for glibc versions before 2.17)." Unfortunately Centos 6 does have an glibc prior to that version, and the libxl Makefile was not updated to add '-lrt' so the build will fail in that environment. This patch simply adds '-lrt' to LIBXL_LIBS unconditionally, as it does no harm in newer environments. Signed-off-by: Paul Durrant Fixes: 2b02882ebbbc ("libxl: add infrastructure to track and query 'recent' domids") Acked-by: Wei Liu --- diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index ed41e4ee3e..69fcf21577 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -24,6 +24,9 @@ LIBXL_LIBS = $(LDLIBS_libxentoollog) $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) ifeq ($(CONFIG_LIBNL),y) LIBXL_LIBS += $(LIBNL3_LIBS) endif +ifeq ($(CONFIG_Linux),y) +LIBXL_LIBS += -lrt +endif CFLAGS_LIBXL += $(CFLAGS_libxentoollog) CFLAGS_LIBXL += $(CFLAGS_libxentoolcore)