37 lines
944 B
Text
37 lines
944 B
Text
$NetBSD: patch-aa,v 1.7 2014/07/12 16:48:26 schwarz Exp $
|
|
|
|
--- src/osip2/port_sema.c.orig 2013-12-18 19:36:46.000000000 +0100
|
|
+++ src/osip2/port_sema.c 2014-07-12 18:20:40.000000000 +0200
|
|
@@ -305,7 +305,6 @@
|
|
struct osip_sem *
|
|
osip_sem_init (unsigned int value)
|
|
{
|
|
- union semun val;
|
|
int i;
|
|
osip_sem_t *sem = (osip_sem_t *) osip_malloc (sizeof (osip_sem_t));
|
|
|
|
@@ -318,8 +317,7 @@
|
|
osip_free (sem);
|
|
return NULL;
|
|
}
|
|
- val.val = (int) value;
|
|
- i = semctl (sem->semid, 0, SETVAL, val);
|
|
+ i = semctl(sem->semid, 0, SETVAL, value);
|
|
if (i != 0) {
|
|
perror ("semctl error");
|
|
osip_free (sem);
|
|
@@ -331,13 +329,11 @@
|
|
int
|
|
osip_sem_destroy (struct osip_sem *_sem)
|
|
{
|
|
- union semun val;
|
|
osip_sem_t *sem = (osip_sem_t *) _sem;
|
|
|
|
if (sem == NULL)
|
|
return OSIP_SUCCESS;
|
|
- val.val = 0;
|
|
- semctl (sem->semid, 0, IPC_RMID, val);
|
|
+ semctl(sem->semid, 0, IPC_RMID, 0);
|
|
osip_free (sem);
|
|
return OSIP_SUCCESS;
|
|
}
|