This code uses clock-relevant functions only on platforms
that do not need -lrt.
* m4/readutmp.m4 (gl_READUTMP): Do not require gl_CLOCK_TIME
or add CLOCK_TIME_LIB to READUTMP_LIB.
* modules/boot-time (Link): No need to link with CLOCK_TIME_LIB.
---
 ChangeLog         | 7 +++++++
 m4/readutmp.m4    | 4 +---
 modules/boot-time | 1 -
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 407e1733ca..9e5c65f564 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2023-08-12  Paul Eggert  <egg...@cs.ucla.edu>
 
+       boot-time,readutmp: remove -lrt usage
+       This code uses clock-relevant functions only on platforms
+       that do not need -lrt.
+       * m4/readutmp.m4 (gl_READUTMP): Do not require gl_CLOCK_TIME
+       or add CLOCK_TIME_LIB to READUTMP_LIB.
+       * modules/boot-time (Link): No need to link with CLOCK_TIME_LIB.
+
        boot-time,readutmp: do not depend on fopen-gnu
        These modules should work well enough even if fopen is not fixed
        to conform to fopen-gnu standards.  The only gotcha I can see is
diff --git a/m4/readutmp.m4 b/m4/readutmp.m4
index c180374044..fff8d4eb7b 100644
--- a/m4/readutmp.m4
+++ b/m4/readutmp.m4
@@ -1,4 +1,4 @@
-# readutmp.m4 serial 27
+# readutmp.m4 serial 28
 dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,8 +40,6 @@ AC_DEFUN([gl_READUTMP],
       fi
     fi
   fi
-  AC_REQUIRE([gl_CLOCK_TIME])
-  READUTMP_LIB="$READUTMP_LIB $CLOCK_TIME_LIB"
   AC_SUBST([READUTMP_LIB])
 
   gl_PREREQ_READUTMP_H
diff --git a/modules/boot-time b/modules/boot-time
index d8ab075024..24a798160a 100644
--- a/modules/boot-time
+++ b/modules/boot-time
@@ -27,7 +27,6 @@ Include:
 "boot-time.h"
 
 Link:
-$(CLOCK_TIME_LIB)
 
 License:
 GPL
-- 
2.39.2


Reply via email to