[PATCH]: Fix sparc64/linux semctl().
David Miller
davem@davemloft.net
Sat Apr 26 17:10:00 GMT 2008
On sparc64, unions and small structures are passed in register
arguments, not by reference.
So, like Alpha, we have to pass the "union semun" object in
properly to match those semantics.
Please apply, thanks!
2008-04-25 David S. Miller <davem@davemloft.net>
* sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c (semctl):
Pass "union semun" properly in to sys_ipc, it must be passed
by value, not by reference.
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
index 057e287..4f826b1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
@@ -54,5 +54,5 @@ semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ CHECK_SEMCTL (&arg, semid, cmd)->array);
}
More information about the Libc-alpha
mailing list