summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/syscalls.master2
-rw-r--r--sys/kern/sysv_msg.c4
-rw-r--r--sys/sys/msg.h3
3 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 03c8794..1cca3bd 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -357,7 +357,7 @@
224 MNOSTD BSD { int msgctl(int msqid, int cmd, \
struct msqid_ds *buf); }
225 MNOSTD BSD { int msgget(key_t key, int msgflg); }
-226 MNOSTD BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \
+226 MNOSTD BSD { int msgsnd(int msqid, const void *msgp, size_t msgsz, \
int msgflg); }
227 MNOSTD BSD { int msgrcv(int msqid, void *msgp, size_t msgsz, \
long msgtyp, int msgflg); }
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 00d0fbb..32c975e 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -566,7 +566,7 @@ done2:
#ifndef _SYS_SYSPROTO_H_
struct msgsnd_args {
int msqid;
- void *msgp;
+ const void *msgp;
size_t msgsz;
int msgflg;
};
@@ -581,7 +581,7 @@ msgsnd(td, uap)
register struct msgsnd_args *uap;
{
int msqid = uap->msqid;
- void *user_msgp = uap->msgp;
+ const void *user_msgp = uap->msgp;
size_t msgsz = uap->msgsz;
int msgflg = uap->msgflg;
int segs_needed, error = 0;
diff --git a/sys/sys/msg.h b/sys/sys/msg.h
index 508e9be..7094e6c 100644
--- a/sys/sys/msg.h
+++ b/sys/sys/msg.h
@@ -127,8 +127,7 @@ int msgctl(int, int, struct msqid_ds *);
int msgget(key_t, int);
/* XXX return value should be ssize_t. */
int msgrcv(int, void *, size_t, long, int);
-/* XXX second parameter missing const type-qualifier. */
-int msgsnd(int, void *, size_t, int);
+int msgsnd(int, const void *, size_t, int);
#if __BSD_VISIBLE
int msgsys(int, ...);
#endif
OpenPOWER on IntegriCloud