This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Fix sparc64/linux semctl().


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);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]