- sema[semid].sem_perm.key = key;
- sema[semid].sem_perm.cuid = kauth_cred_getuid(cred);
- sema[semid].sem_perm.uid = kauth_cred_getuid(cred);
- sema[semid].sem_perm.cgid = cred->cr_gid;
- sema[semid].sem_perm.gid = cred->cr_gid;
- sema[semid].sem_perm.mode = (semflg & 0777) | SEM_ALLOC;
- sema[semid].sem_perm.seq =
- (sema[semid].sem_perm.seq + 1) & 0x7fff;
- sema[semid].sem_nsems = nsems;
- sema[semid].sem_otime = 0;
- sema[semid].sem_ctime = sysv_semtime();
- sema[semid].sem_base = &sem_pool[semtot];
+ sema[semid].u.sem_perm._key = key;
+ sema[semid].u.sem_perm.cuid = kauth_cred_getuid(cred);
+ sema[semid].u.sem_perm.uid = kauth_cred_getuid(cred);
+ sema[semid].u.sem_perm.cgid = cred->cr_gid;
+ sema[semid].u.sem_perm.gid = cred->cr_gid;
+ sema[semid].u.sem_perm.mode = (semflg & 0777) | SEM_ALLOC;
+ sema[semid].u.sem_perm._seq =
+ (sema[semid].u.sem_perm._seq + 1) & 0x7fff;
+ sema[semid].u.sem_nsems = nsems;
+ sema[semid].u.sem_otime = 0;
+ sema[semid].u.sem_ctime = sysv_semtime();
+ sema[semid].u.sem_base = &sem_pool[semtot];