]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
src/Makefile: Link clock_gettime(2) with -lrt
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Thu, 21 Feb 2019 07:39:01 +0000 (15:39 +0800)
committerEryu Guan <guaneryu@gmail.com>
Fri, 22 Feb 2019 01:03:44 +0000 (09:03 +0800)
commit202779bc0989357470fd1e6e6084c1a445e52ec5
tree027509fb182ebfe4781ce8648a61552fb17f5fa6
parent23b1f2ccba1d6d7e7e61acac4ea8e8ab094d0c80
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>
src/Makefile