From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] src/Makefile: Link clock_gettime(2) with -lrt
Date: Thu, 21 Feb 2019 08:14:42 -0800 [thread overview]
Message-ID: <20190221161442.GK6477@magnolia> (raw)
In-Reply-To: <1550734741-4375-1-git-send-email-yangx.jy@cn.fujitsu.com>
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
>
>
>
prev parent reply other threads:[~2019-02-21 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190221161442.GK6477@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=yangx.jy@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox