summaryrefslogtreecommitdiff
path: root/ipc/ipc_kmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/ipc_kmsg.c')
-rw-r--r--ipc/ipc_kmsg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c
index 12bd0c7..100cc93 100644
--- a/ipc/ipc_kmsg.c
+++ b/ipc/ipc_kmsg.c
@@ -34,6 +34,8 @@
* Operations on kernel messages.
*/
+#include <string.h>
+
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/message.h>
@@ -558,7 +560,7 @@ ipc_kmsg_get_from_kernel(msg, size, kmsgp)
return MACH_SEND_NO_BUFFER;
ikm_init(kmsg, size);
- bcopy((char *) msg, (char *) &kmsg->ikm_header, size);
+ memcpy(&kmsg->ikm_header, msg, size);
kmsg->ikm_header.msgh_size = size;
*kmsgp = kmsg;
@@ -623,7 +625,7 @@ ipc_kmsg_put_to_kernel(
assert(!KMSG_IN_DIPC(kmsg));
#endif /* DIPC */
- (void) memcpy((void *) msg, (const void *) &kmsg->ikm_header, size);
+ memcpy(msg, &kmsg->ikm_header, size);
ikm_free(kmsg);
}