prepare struct sched_param for change in time_t definition
authorRich Felker <dalias@aerifal.cx>
Sat, 10 Aug 2019 02:20:55 +0000 (22:20 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 28 Oct 2019 23:26:52 +0000 (19:26 -0400)
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.

include/sched.h

index c3a8d49a1aaa7ea54230c9e178f7a526e279fd54..822f464efd20d5cef3abb1488eac2b458fa7c1be 100644 (file)
@@ -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;
 };