src/Makefile: Link clock_gettime(2) with -lrt

Compiling t_open_tmpfiles.c failed on older glibc(before glibc v2.17)
because clock_gettime(2) was not linked with -lrt, as below:
--------------------------------------------------------------------
/home/yangxiao/xfstests/src/t_open_tmpfiles.c:36: undefined reference to `clock_gettime'
--------------------------------------------------------------------

According to clock_gettime(2) manpage, we should link clock_gettime(2)
with -lrt on older glibc.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Xiao Yang
2019-02-21 15:39:01 +08:00
committed by Eryu Guan
parent 23b1f2ccba
commit 202779bc09
+1 -1
View File
@@ -31,7 +31,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
SUBDIRS = log-writes perf
LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread
LLDLIBS = $(LIBATTR) $(LIBHANDLE) $(LIBACL) -lpthread -lrt
ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
LINUX_TARGETS += loggen