Subject: port-i386/1304: botch in kern_ipc_10.c
To: None <gnats-bugs@NetBSD.ORG>
From: Kenneth Stailey <kstailey@gnu.ai.mit.edu>
List: netbsd-bugs
Date: 08/01/1995 23:07:41
>Number: 1304
>Category: port-i386
>Synopsis: botch in kern_ipc_10.c
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 1 23:20:02 1995
>Last-Modified:
>Originator: Kenneth Stailey
>Organization:
Just this guy, you know.
>Release: Sun July 30, 1995
>Environment:
NetBSD 1.0A (PLUTO) #5: Mon Jul 31 09:40:17 EDT 1995 ken@pluto:/usr/src/sys/arch/i386/compile/PLUTO
>Description:
If you want to use COMPAT_10 and SYSVSHM without SYSVMSG and/or
SYSVSEM you get a lot of link errors from kern_ipc_10.o
>How-To-Repeat:
Implicit in Description.
>Fix:
apply this (or something like it)
--- kern_ipc_10.c.orig Tue Aug 1 22:54:52 1995
+++ kern_ipc_10.c Tue Aug 1 22:57:37 1995
@@ -78,13 +78,13 @@
} */ semconfig_args;
switch (SCARG(uap, which)) {
+#ifdef SYSVSEM
case 0: /* __semctl() */
SCARG(&__semctl_args, semid) = SCARG(uap, a2);
SCARG(&__semctl_args, semnum) = SCARG(uap, a3);
SCARG(&__semctl_args, cmd) = SCARG(uap, a4);
SCARG(&__semctl_args, arg) = (union semun *)SCARG(uap, a5);
return (__semctl(p, &__semctl_args, retval));
-
case 1: /* semget() */
SCARG(&semget_args, key) = SCARG(uap, a2);
SCARG(&semget_args, nsems) = SCARG(uap, a3);
@@ -100,7 +100,7 @@
case 3: /* semconfig() */
SCARG(&semconfig_args, flag) = SCARG(uap, a2);
return (semconfig(p, &semconfig_args, retval));
-
+#endif /* SYSVSEM */
default:
return (EINVAL);
}
@@ -138,6 +138,7 @@
} */ shmget_args;
switch (SCARG(uap, which)) {
+#ifdef SYSVSHM
case 0: /* shmat() */
SCARG(&shmat_args, shmid) = SCARG(uap, a2);
SCARG(&shmat_args, shmaddr) = (void *)SCARG(uap, a3);
@@ -159,7 +160,7 @@
SCARG(&shmget_args, size) = SCARG(uap, a3);
SCARG(&shmget_args, shmflg) = SCARG(uap, a4);
return (shmget(p, &shmget_args, retval));
-
+#endif /* SYSVSHM */
default:
return (EINVAL);
}
@@ -203,6 +204,7 @@
} */ msgrcv_args;
switch (SCARG(uap, which)) {
+#ifdef SYSVMSG
case 0: /* msgctl()*/
SCARG(&msgctl_args, msqid) = SCARG(uap, a2);
SCARG(&msgctl_args, cmd) = SCARG(uap, a3);
@@ -229,7 +231,7 @@
SCARG(&msgrcv_args, msgtyp) = SCARG(uap, a5);
SCARG(&msgrcv_args, msgflg) = SCARG(uap, a6);
return (msgrcv(p, &msgrcv_args, retval));
-
+#endif /* SYSVMSG */
default:
return (EINVAL);
}
>Audit-Trail:
>Unformatted: