mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
sys/posix: use '#max_field_align'
This commit is contained in:
@@ -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