[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] libxl: fix build with older glibc

commit 37a5b5f673a78f03f8e63f86b98ac89dd13632e1
Author:     Paul Durrant <pdurrant@xxxxxxxxxx>
AuthorDate: Tue Feb 25 12:33:43 2020 +0000
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Tue Feb 25 14:28:59 2020 +0000

    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 <pdurrant@xxxxxxxxxx>
    Fixes: 2b02882ebbbc ("libxl: add infrastructure to track and query 'recent' 
    Acked-by: Wei Liu <wl@xxxxxxx>
 tools/libxl/Makefile | 3 +++
 1 file changed, 3 insertions(+)

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) 
 ifeq ($(CONFIG_LIBNL),y)
+ifeq ($(CONFIG_Linux),y)
+LIBXL_LIBS += -lrt
 CFLAGS_LIBXL += $(CFLAGS_libxentoollog)
 CFLAGS_LIBXL += $(CFLAGS_libxentoolcore)
generated by git-patchbot for /home/xen/git/xen.git#staging

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.