svn commit: r301026 - head/sys/sys

Ed Schouten ed at FreeBSD.org
Tue May 31 08:07:42 UTC 2016


Author: ed
Date: Tue May 31 08:07:40 2016
New Revision: 301026
URL: https://svnweb.freebsd.org/changeset/base/301026

Log:
  Let <sched.h> define struct timespec.
  
  POSIX 2004 doesn't require that this header defines struct timespec, but
  does allow it. For FreeBSD, we would at least need a forward declaration
  for sched_rr_get_interval().
  
  POSIX 2008 is a bit more demanding, as it now requires that it is
  declared. Remove the old forward declaration and include the _timespec.h
  header. This should conform to both POSIX 2004 and 2008 now.

Modified:
  head/sys/sys/sched.h

Modified: head/sys/sys/sched.h
==============================================================================
--- head/sys/sys/sched.h	Tue May 31 07:49:59 2016	(r301025)
+++ head/sys/sys/sched.h	Tue May 31 08:07:40 2016	(r301026)
@@ -222,6 +222,7 @@ struct sched_param {
  */
 #ifndef _KERNEL
 #include <sys/cdefs.h>
+#include <sys/_timespec.h>
 #include <sys/_types.h>
 
 #ifndef _PID_T_DECLARED
@@ -229,8 +230,6 @@ typedef __pid_t         pid_t;
 #define _PID_T_DECLARED
 #endif
 
-struct timespec;
-
 __BEGIN_DECLS
 int     sched_get_priority_max(int);
 int     sched_get_priority_min(int);


More information about the svn-src-all mailing list