POSIX.1-2001 declares usleep is obsolete. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- text-utils/tailf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/text-utils/tailf.c b/text-utils/tailf.c index 9571645..d76d53d 100644 --- a/text-utils/tailf.c +++ b/text-utils/tailf.c @@ -39,10 +39,10 @@ #ifdef HAVE_INOTIFY_INIT #include <sys/inotify.h> #endif +#include <time.h> #include "nls.h" #include "xalloc.h" -#include "usleep.h" #include "strutils.h" #include "c.h" #include "closestream.h" @@ -133,8 +133,11 @@ static void watch_file(const char *filename, off_t *size) { do { + struct timespec waittime; + waittime.tv_sec = 0; + waittime.tv_nsec = 250000000; roll_file(filename, size); - usleep(250000); + nanosleep(&waittime, NULL); } while(1); } -- 1.7.12.2 -- 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