about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-08-09 22:20:55 -0400
committerRich Felker <dalias@aerifal.cx>2019-10-28 19:26:52 -0400
commit2d69fcf5ef271c1f5fec45ee9337ec7280a5dae7 (patch)
tree59a0c43b50bb270b7130f8ede82f5a77afa47ae4 /include
parent1febd21d3fb7b78f6fc13e48b3ff2a396a607a15 (diff)
downloadmusl-2d69fcf5ef271c1f5fec45ee9337ec7280a5dae7.tar.gz
musl-2d69fcf5ef271c1f5fec45ee9337ec7280a5dae7.tar.xz
musl-2d69fcf5ef271c1f5fec45ee9337ec7280a5dae7.zip
prepare struct sched_param for change in time_t definition
the time_t members in struct sched_param are just reserved space to
preserve size and alignment. when time_t changes to 64-bit on 32-bit
archs, this structure should not change.

make definition conditional on _REDIR_TIME64 to match the size of the
old time_t, which can be assumed to be long if _REDIR_TIME64 is
defined.
Diffstat (limited to 'include')
-rw-r--r--include/sched.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sched.h b/include/sched.h
index c3a8d49a..822f464e 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -19,10 +19,14 @@ extern "C" {
 struct sched_param {
 	int sched_priority;
 	int __reserved1;
+#if _REDIR_TIME64
+	long __reserved2[4];
+#else
 	struct {
 		time_t __reserved1;
 		long __reserved2;
 	} __reserved2[2];
+#endif
 	int __reserved3;
 };