X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/a92a0909e5718db781ac21b72e118060b2f28692..22f5e8721c337cc2518af785a9b6f0a19a763815:/openbsd-compat/bsd-misc.c diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d2d9ad77..55f100ac 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -17,7 +17,18 @@ #include "includes.h" +#include +#ifdef HAVE_SYS_SELECT_H +# include +#endif +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#include #include +#include +#include #include "xmalloc.h" @@ -147,7 +158,8 @@ int nanosleep(const struct timespec *req, struct timespec *rem) tremain.tv_sec = 0; tremain.tv_usec = 0; } - TIMEVAL_TO_TIMESPEC(&tremain, rem) + if (rem != NULL) + TIMEVAL_TO_TIMESPEC(&tremain, rem) return(rc); }