From: Ian Kent <raven@themaw.net>
To: Gustavo Zacarias <gustavo@zacarias.com.ar>, autofs@vger.kernel.org
Subject: Re: [PATCH] autofs: build: check for clock_gettime in librt
Date: Sun, 19 Jun 2016 18:11:34 +0800 [thread overview]
Message-ID: <1466331094.4761.27.camel@themaw.net> (raw)
In-Reply-To: <1466306353-11612-1-git-send-email-gustavo@zacarias.com.ar>
On Sun, 2016-06-19 at 00:19 -0300, Gustavo Zacarias wrote:
> Glibc versions older than 2.17 define clock_gettime() in librt, so add a
> check for this.
I'll include this the next time I push to the repo.
I'll check the build output before then but it doesn't look like I'll see a
problem.
Thanks
Ian
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> Makefile.conf.in | 3 +++
> Makefile.rules | 2 ++
> configure.in | 4 ++++
> 3 files changed, 9 insertions(+)
>
> diff --git a/Makefile.conf.in b/Makefile.conf.in
> index cb53e66..2bc3202 100644
> --- a/Makefile.conf.in
> +++ b/Makefile.conf.in
> @@ -11,6 +11,9 @@
> DAEMON_CFLAGS = @DAEMON_CFLAGS@
> DAEMON_LDFLAGS = @DAEMON_LDFLAGS@
>
> +# Glibc < 2.17 requires librt for clock_gettime()
> +LIBCLOCK_GETTIME = @LIBCLOCK_GETTIME@
> +
> # Special parameters for glibc (libc 6)
> LIBNSL = @LIBNSL@
> LIBRESOLV = @LIBRESOLV@
> diff --git a/Makefile.rules b/Makefile.rules
> index 6fa3e02..7d1af2e 100644
> --- a/Makefile.rules
> +++ b/Makefile.rules
> @@ -56,6 +56,8 @@ endif
>
> LIBS += $(LIBNSL)
>
> +LIBS += $(LIBCLOCK_GETTIME)
> +
> # Standard rules
>
> .SUFFIXES: .c .o .s .so
> diff --git a/configure.in b/configure.in
> index 25d7c4e..a4318e8 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -177,6 +177,10 @@ if test "$ac_cv_search_versionsort" = "no"; then
> [Define if your C library does not provide versionsort])
> fi
>
> +# glibc < 2.17 needs librt for clock_gettime()
> +AC_CHECK_LIB(rt, clock_gettime, LIBCLOCK_GETTIME="-lrt")
> +AC_SUBST(LIBCLOCK_GETTIME)
> +
> #
> # glibc/libc 6 new libraries
> #
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
prev parent reply other threads:[~2016-06-19 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-19 3:19 [PATCH] autofs: build: check for clock_gettime in librt Gustavo Zacarias
2016-06-19 10:11 ` Ian Kent [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=1466331094.4761.27.camel@themaw.net \
--to=raven@themaw.net \
--cc=autofs@vger.kernel.org \
--cc=gustavo@zacarias.com.ar \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).