X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/8151aaa57dc7b1773d07b8d748f3e70c6dd44729..9b4b86c2134a67e76ed043f67481cd5da84511a8:/openbsd-compat/bsd-misc.c diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index c6b80365..55f100ac 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -17,6 +17,10 @@ #include "includes.h" +#include +#ifdef HAVE_SYS_SELECT_H +# include +#endif #ifdef HAVE_SYS_TIME_H # include #endif @@ -24,6 +28,7 @@ #include #include #include +#include #include "xmalloc.h" @@ -153,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); }