sys/posix: use '#max_field_align'
This commit is contained in:
1 parent
9919a0cacd
commit
ab54ad3a75
3 files changed
+30
-44
No files matched your search
@@ -79,19 +79,15 @@ when ODIN_OS == .Darwin || ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD || ODIN_OS
|
||||
SETALL :: 9
|
||||
|
||||
when ODIN_OS == .Darwin {
|
||||
// NOTE: this is #pragma pack(4)
|
||||
|
||||
semid_ds :: struct #align(4) {
|
||||
sem_perm: ipc_perm, /* [PSX] operation permission structure */
|
||||
sem_base: c.int32_t, /* 32 bit base ptr for semaphore set */
|
||||
sem_nsems: c.ushort, /* [PSX] number of semaphores in set */
|
||||
sem_otime: time_t, /* [PSX] last semop() */
|
||||
semid_ds :: struct #max_field_align(4) {
|
||||
sem_perm: ipc_perm, /* [PSX] operation permission structure */
|
||||
sem_base: c.int32_t, /* 32 bit base ptr for semaphore set */
|
||||
sem_nsems: c.ushort, /* [PSX] number of semaphores in set */
|
||||
sem_otime: time_t, /* [PSX] last semop() */
|
||||
sem_pad1: c.int32_t,
|
||||
using _: struct #align(4) {
|
||||
sem_ctime: time_t, /* [PSX] last time changed by semctl() */
|
||||
sem_pad2: c.int32_t,
|
||||
sem_pad3: [4]c.int32_t,
|
||||
},
|
||||
sem_ctime: time_t, /* [PSX] last time changed by semctl() */
|
||||
sem_pad2: c.int32_t,
|
||||
sem_pad3: [4]c.int32_t,
|
||||
}
|
||||
} else when ODIN_OS == .FreeBSD {
|
||||
semid_ds :: struct {
|
||||
|
||||
Reference in new issue
Block a user