From: Todd C. Miller Date: Sat, 14 Jan 2017 04:29:02 +0000 (-0700) Subject: Define HAVE_NANOSLEEP if we find nanosleep in librt X-Git-Tag: SUDO_1_8_19p2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09698b8a3114854436909a708c7ea57149757263;p=sudo Define HAVE_NANOSLEEP if we find nanosleep in librt --- diff --git a/configure b/configure index f7f82442d..9461e557e 100755 --- a/configure +++ b/configure @@ -19739,7 +19739,11 @@ fi { $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 diff --git a/configure.ac b/configure.ac index 9087ffc73..99e8b6502 100644 --- a/configure.ac +++ b/configure.ac @@ -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) ])