Re: [PATCH 02/12] dmesg: move get_boot_time() to lib/timeutils

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 06, 2014 at 12:00:00PM +0200, Ruediger Meier wrote:
> On Sunday 27 April 2014, Sami Kerola wrote:
> > In future the last(1) will use get_boot_time() as well.
> >
> > Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
> > ---
> >  include/timeutils.h |  1 +
> >  lib/timeutils.c     | 29 +++++++++++++++++++++++++++++
> >  sys-utils/dmesg.c   | 27 ---------------------------
> >  3 files changed, 30 insertions(+), 27 deletions(-)
> >
> > [...]
> > -
> > -#ifdef CLOCK_BOOTTIME
> > -	if (clock_gettime(CLOCK_BOOTTIME, &hires_uptime) == 0) {
> > -		TIMESPEC_TO_TIMEVAL(&lores_uptime, &hires_uptime);
> > -		timersub(&now, &lores_uptime, boot_time);
> > -		return 0;
> > -	}
> 
> clock_gettime() needs -lrt on some systems. That's why we had 
> dmesg_LDADD += -lrt. Now every binary which links against libcommon 
> needs that.

 Fixed, I have moved get_boot_time() outside libcommon. The question
 is how portable will be last(1), maybe it will necessary to add
 something like "if HAVE_LIBRT" to the build system, now there is 
 hardcoded -lrt.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux