From 4e4dc561ae948a410fb82fd8b0960ec2cf8e2e70 Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Tue, 18 Mar 2003 10:21:40 -0800 Subject: [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] add nanosleep(). testing/corrections by Darren Tucker --- openbsd-compat/bsd-misc.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'openbsd-compat/bsd-misc.h') diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 981196044..78d9ccdd4 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: bsd-misc.h,v 1.6 2002/06/13 21:34:58 mouring Exp $ */ +/* $Id: bsd-misc.h,v 1.7 2003/03/18 18:21:41 tim Exp $ */ #ifndef _BSD_MISC_H #define _BSD_MISC_H @@ -80,5 +80,14 @@ int truncate (const char *path, off_t length); int setgroups(size_t size, const gid_t *list); #endif +#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) +#ifndef HAVE_STRUCT_TIMESPEC +struct timespec { + time_t tv_sec; + long tv_nsec; +}; +#endif +int nanosleep(const struct timespec *req, struct timespec *rem); +#endif #endif /* _BSD_MISC_H */ -- cgit v1.2.3