summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r--openbsd-compat/bsd-misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index bea3144bd..55f100ac0 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -158,7 +158,8 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
158 tremain.tv_sec = 0; 158 tremain.tv_sec = 0;
159 tremain.tv_usec = 0; 159 tremain.tv_usec = 0;
160 } 160 }
161 TIMEVAL_TO_TIMESPEC(&tremain, rem) 161 if (rem != NULL)
162 TIMEVAL_TO_TIMESPEC(&tremain, rem)
162 163
163 return(rc); 164 return(rc);
164} 165}