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.
This commit is contained in:
parent
806ea85ac5
commit
b933c950fa
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user