* [PATCH] src/Makefile: Link clock_gettime(2) with -lrt
@ 2019-02-21 7:39 Xiao Yang
2019-02-21 16:14 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2019-02-21 7:39 UTC (permalink / raw)
To: fstests; +Cc: Xiao Yang
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>
---
src/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index dbba7c7..4057d7b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] src/Makefile: Link clock_gettime(2) with -lrt
2019-02-21 7:39 [PATCH] src/Makefile: Link clock_gettime(2) with -lrt Xiao Yang
@ 2019-02-21 16:14 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2019-02-21 16:14 UTC (permalink / raw)
To: Xiao Yang; +Cc: fstests
On Thu, Feb 21, 2019 at 03:39:01PM +0800, Xiao Yang wrote:
> 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>
Looks good to me, sorry about that...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> src/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/Makefile b/src/Makefile
> index dbba7c7..4057d7b 100644
> --- a/src/Makefile
> +++ b/src/Makefile
> @@ -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
> --
> 1.7.1
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-21 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-21 7:39 [PATCH] src/Makefile: Link clock_gettime(2) with -lrt Xiao Yang
2019-02-21 16:14 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox