diff -Naur a/kern/ipc_kobject.c b/kern/ipc_kobject.c --- a/kern/ipc_kobject.c 2011-08-24 11:28:20.000000000 +0200 +++ b/kern/ipc_kobject.c 2011-08-24 08:47:48.000000000 +0200 @@ -46,6 +46,7 @@ #include #include #include +#include #include #if MACH_MACHINE_ROUTINES diff -Naur a/vm/memory_object_proxy.c b/vm/memory_object_proxy.c --- a/vm/memory_object_proxy.c 2011-08-24 11:28:21.000000000 +0200 +++ b/vm/memory_object_proxy.c 2011-08-24 09:03:51.000000000 +0200 @@ -125,7 +125,6 @@ vm_offset_t *len, natural_t len_count, ipc_port_t *port) { - kern_return_t kr; memory_object_proxy_t proxy; ipc_port_t notify; diff -Naur a/vm/memory_object_proxy.h b/vm/memory_object_proxy.h --- a/vm/memory_object_proxy.h 1970-01-01 01:00:00.000000000 +0100 +++ b/vm/memory_object_proxy.h 2011-08-24 08:48:03.000000000 +0200 @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2011 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Author: Fridolin Pokorny + */ + +#ifndef _MEMORY_OBJECT_PROXY_H_ +#define _MEMORY_OBJECT_PROXT_H_ + +#include +#include +#include +#include + +extern void memory_object_proxy_init(void); +extern boolean_t memory_object_proxy_notify(mach_msg_header_t *msg); +extern kern_return_t memory_object_create_proxy( + ipc_space_t space, + vm_prot_t max_protection, + ipc_port_t *object, + natural_t object_count, + vm_offset_t *offset, + natural_t offset_count, + vm_offset_t *start, + natural_t start_count, + vm_offset_t *len, + natural_t len_count, + ipc_port_t *port); +extern kern_return_t memory_object_proxy_lookup( + ipc_port_t port, + ipc_port_t *object, + vm_prot_t *max_protection); + +#endif /* _MEMORY_OBJECT_PROXY_H_ */ diff -Naur a/vm/vm_init.c b/vm/vm_init.c --- a/vm/vm_init.c 2011-08-24 11:28:21.000000000 +0200 +++ b/vm/vm_init.c 2011-08-24 08:48:14.000000000 +0200 @@ -43,6 +43,7 @@ #include #include #include +#include