[PATCH] npth: npth-config should include -lrt for clock_gettime

NIIBE Yutaka gniibe at fsij.org
Mon Apr 27 04:12:19 CEST 2015


Hello,

In the past, I got this issue, but forgot to report.  For some old
systems (for example, GNU/Linux system with old glibc), -lrt is needed
for clock_gettime function.  npth itself handles this.  npth-config
should address this problem, too.

I encountered this problem (again) for Red Hat Enterprise Linux 5.11.
See: https://bugs.gnupg.org/gnupg/issue1862

Here is a patch to npth, so that npth-config --libs includes the library.
Ok to apply?

diff --git a/configure.ac b/configure.ac
index eb534d7..e503324 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,6 +271,7 @@ AC_SEARCH_LIBS([clock_gettime],[rt posix4])
 if test "x$ac_cv_search_clock_gettime" != no; then
     AC_DEFINE(HAVE_CLOCK_GETTIME,1,
               [Define to 1 if you have the `clock_gettime' function.])
+    config_libs="$config_libs $ac_cv_search_clock_gettime"
 fi


-- 



More information about the Gnupg-devel mailing list