mirror of https://git.musl-libc.org/git/musl
Browse Source
various padding fields in the generic bits/sem.h were defined in terms of time_t as a cheap hack standing in for "kernel long", to allow x32 to use the generic version of the file. this was a really bad idea, as it ended up getting copied into lots of arch-specific versions of the bits file, and is a blocker to changing time_t to 64-bit on 32-bit archs. this commit adds an x32-specific version of the header, and changes padding type back from time_t to long (currently the same type on all archs but x32) in the generic header and all the others the hack got copied into.master
7 changed files with 36 additions and 25 deletions
@ -1,16 +1,16 @@ |
|||
struct semid_ds { |
|||
struct ipc_perm sem_perm; |
|||
time_t sem_otime; |
|||
time_t __unused1; |
|||
long __unused1; |
|||
time_t sem_ctime; |
|||
time_t __unused2; |
|||
long __unused2; |
|||
#if __BYTE_ORDER == __LITTLE_ENDIAN |
|||
unsigned short sem_nsems; |
|||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; |
|||
char __sem_nsems_pad[sizeof(long)-sizeof(short)]; |
|||
#else |
|||
char __sem_nsems_pad[sizeof(time_t)-sizeof(short)]; |
|||
char __sem_nsems_pad[sizeof(long)-sizeof(short)]; |
|||
unsigned short sem_nsems; |
|||
#endif |
|||
time_t __unused3; |
|||
time_t __unused4; |
|||
long __unused3; |
|||
long __unused4; |
|||
}; |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
struct semid_ds { |
|||
struct ipc_perm sem_perm; |
|||
time_t sem_otime; |
|||
long long __unused1; |
|||
time_t sem_ctime; |
|||
long long __unused2; |
|||
unsigned short sem_nsems; |
|||
char __sem_nsems_pad[sizeof(long long)-sizeof(short)]; |
|||
long long __unused3; |
|||
long long __unused4; |
|||
}; |
|||
Loading…
Reference in new issue