summaryrefslogtreecommitdiff
path: root/libc/misc/sysvipc
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-09-28 13:13:44 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-09-28 13:13:44 +0000
commit31cfe2300d8b9aee110ba0a7213f6befdd3ffce0 (patch)
treef6ecda8e30f2994538ab94c9e5886c1e0067cd03 /libc/misc/sysvipc
parent7a2c357151e82fe59ca396c81c5f28efecc0094a (diff)
Atsushi Nemoto writes:
Hi. I found a mismatch between uClibc and kernel in semctl definition. In uClibc/libc/misc/sysvipc/sem.c: static inline _syscall4(int, __semctl, int, semid, int, semnum, int, cmd, union semun *, arg); ... int semctl(int semid, int semnum, int cmd, ...) ... arg = va_arg (ap, union semun); ... return __semctl(semid, semnum, cmd, &arg); But kernel's semctl is: asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg) The last argument is an union semun itself, not a pointer to the union. Here is a patch.
Diffstat (limited to 'libc/misc/sysvipc')
-rw-r--r--libc/misc/sysvipc/sem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/misc/sysvipc/sem.c b/libc/misc/sysvipc/sem.c
index 1cc39e7bd..8c9672bad 100644
--- a/libc/misc/sysvipc/sem.c
+++ b/libc/misc/sysvipc/sem.c
@@ -38,7 +38,7 @@ union semun {
#ifdef __NR_semctl
#define __NR___semctl __NR_semctl
-static inline _syscall4(int, __semctl, int, semid, int, semnum, int, cmd, union semun *, arg);
+static inline _syscall4(int, __semctl, int, semid, int, semnum, int, cmd, void *, arg);
#endif
int semctl(int semid, int semnum, int cmd, ...)
@@ -51,7 +51,7 @@ int semctl(int semid, int semnum, int cmd, ...)
arg = va_arg (ap, union semun);
va_end (ap);
#ifdef __NR_semctl
- return __semctl(semid, semnum, cmd, &arg);
+ return __semctl(semid, semnum, cmd, arg.__pad);
#else
return __syscall_ipc(IPCOP_semctl, semid, semnum, cmd, &arg);
#endif