summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2011-07-14 14:18:14 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2011-07-14 14:18:14 +0000
commit1080a2c85d12422ae33390c21df17305218ba729 (patch)
tree1afc60e746e75165a27b6764cbbf83a768420f88 /sys/compat
parent682c9e0fed0115eb6f283e755901c0aac90e86e8 (diff)
Notes
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_ipc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 97cea5378443..a43de9524a46 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -575,7 +575,15 @@ linux_semctl(struct thread *td, struct linux_semctl_args *args)
return (error);
case LINUX_IPC_INFO:
case LINUX_SEM_INFO:
- bcopy(&seminfo, &linux_seminfo, sizeof(linux_seminfo) );
+ bcopy(&seminfo, &linux_seminfo.semmni, sizeof(linux_seminfo) -
+ sizeof(linux_seminfo.semmap) );
+ /*
+ * Linux does not use the semmap field either but populates it
+ * with the defined value from SEMMAP, which really is redefined
+ * to SEMMNS, which they define as SEMMNI * SEMMSL.
+ * Try to simulate this returning our dynamic semmns value.
+ */
+ linux_seminfo.semmap = linux_seminfo.semmns;
/* XXX BSD equivalent?
#define used_semids 10
#define used_sems 10