summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_ipc.c')
-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 97cea53..36223b1 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 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
OpenPOWER on IntegriCloud