]> granicus.if.org Git - sudo/commitdiff
Define HAVE_NANOSLEEP if we find nanosleep in librt
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 14 Jan 2017 04:29:02 +0000 (21:29 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 14 Jan 2017 04:29:02 +0000 (21:29 -0700)
configure
configure.ac

index f7f82442d7409d2afd4a4d27f087892c7b1f8524..9461e557e2a1d7513429f716fece0139852b2b90 100755 (executable)
--- a/configure
+++ b/configure
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
 if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
-  REPLAY_LIBS="${REPLAY_LIBS} -lrt"
+
+       $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
+
+       LIBRT="-lrt"
+
 else
 
        case " $LIBOBJS " in
index 9087ffc7345dbee8c7e74a1c62c319f364a24514..99e8b650247c6ac254d87bcdaea60cb0137d536d 100644 (file)
@@ -2580,7 +2580,10 @@ AC_CHECK_FUNCS([memset_s], [], [
 ])
 AC_CHECK_FUNCS(nanosleep, [], [
     # On Solaris, nanosleep is in librt
-    AC_CHECK_LIB(rt, nanosleep, [REPLAY_LIBS="${REPLAY_LIBS} -lrt"], [
+    AC_CHECK_LIB(rt, nanosleep, [
+       AC_DEFINE(HAVE_NANOSLEEP)
+       LIBRT="-lrt"
+    ], [
        AC_LIBOBJ(nanosleep)
        SUDO_APPEND_COMPAT_EXP(sudo_nanosleep)
     ])