summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2022-10-25 16:30:31 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2022-10-25 16:30:31 +0000
commitc0bf6e2d46629030d3b85c88ff0dd15e0c9df465 (patch)
tree4c32e8106e3766b49d92056087093b698f36b799 /include
parent14830133c720c9f5a25eec4acb11742c4b97da48 (diff)
Move CLOCKS_PER_SEC to sys/_time.h so the kernel has access to it.
This will be used in waitid(2) to set si_utime and si_stime. The definition of struct timespec also moves from time.h to sys/_time.h for struct itimerspec. OK kettenis@
Diffstat (limited to 'include')
-rw-r--r--include/time.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/include/time.h b/include/time.h
index 51bee8fe771..3e1e2b4619e 100644
--- a/include/time.h
+++ b/include/time.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $ */
+/* $OpenBSD: time.h,v 1.32 2022/10/25 16:30:30 millert Exp $ */
/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */
/*
@@ -44,6 +44,7 @@
#include <sys/cdefs.h>
#include <sys/_null.h>
#include <sys/_types.h>
+#include <sys/_time.h>
#ifndef _CLOCK_T_DEFINED_
#define _CLOCK_T_DEFINED_
@@ -68,21 +69,7 @@ typedef __size_t size_t;
#define CLK_TCK 100
#endif
-#define CLOCKS_PER_SEC 100 /* frequency of ticks reported by clock(). */
-
-#if __POSIX_VISIBLE >= 199309 || __ISO_C_VISIBLE >= 2011
-#ifndef _TIMESPEC_DECLARED
-#define _TIMESPEC_DECLARED
-struct timespec {
- time_t tv_sec; /* seconds */
- long tv_nsec; /* and nanoseconds */
-};
-#endif
-#endif
-
#if __POSIX_VISIBLE >= 199309
-#include <sys/_time.h>
-
#ifndef _CLOCKID_T_DEFINED_
#define _CLOCKID_T_DEFINED_
typedef __clockid_t clockid_t;