aboutsummaryrefslogtreecommitdiffstats
path: root/openbsd-compat/openbsd-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r--openbsd-compat/openbsd-compat.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index ab23a933..be9b90e1 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -290,6 +290,24 @@ char * strnlen(const char *, size_t);
#endif
+
+#ifndef HAVE_STRUCT_TIMEVAL
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+}
+#endif
+
+#ifdef NEED_NANOSLEEP
+#ifndef HAVE_STRUCT_TIMESPEC
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+int nanosleep(const struct timespec *, struct timespec *);
+#endif
+
#ifdef NEED_SIGNAL
typedef void (*mysig_t)(int);
mysig_t mysignal(int sig, mysig_t act);
@@ -300,5 +318,8 @@ mysig_t mysignal(int sig, mysig_t act);
const char *strerror(int);
#endif
+#ifdef NEED_USLEEP
+int usleep(unsigned int useconds);
+#endif
#endif /* _OPENBSD_COMPAT_H */