libxl: fix build with older glibc
authorPaul Durrant <pdurrant@amazon.com>
Tue, 25 Feb 2020 12:33:43 +0000 (12:33 +0000)
committerWei Liu <wl@xen.org>
Tue, 25 Feb 2020 14:28:59 +0000 (14:28 +0000)
commit37a5b5f673a78f03f8e63f86b98ac89dd13632e1
tree9e30df1748d2348b517a51d260954b8dfcbc2c3c
parentead4c2d8314cea8defb6e9613071f21df6d216c2
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@amazon.com>
Fixes: 2b02882ebbbc ("libxl: add infrastructure to track and query 'recent' domids")
Acked-by: Wei Liu <wl@xen.org>
tools/libxl/Makefile