From c0bf6e2d46629030d3b85c88ff0dd15e0c9df465 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 25 Oct 2022 16:30:31 +0000 Subject: 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@ --- include/time.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'include') 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 #include #include +#include #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 - #ifndef _CLOCKID_T_DEFINED_ #define _CLOCKID_T_DEFINED_ typedef __clockid_t clockid_t; -- cgit v1.2.3