summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:31:51 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:31:51 +0000
commit5b1ade980a0f2b0de705c08954baddb816023c4c (patch)
tree640e146115018ac8a1033009b1e2bcbdc509e9da
parent07ac809a3395c5776fec2f2a50e2f8eaa6be459f (diff)
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* pf.c (S_socket_whatis_address): Use mmap instead of vm_allocate.
-rw-r--r--pflocal/ChangeLog4
-rw-r--r--pflocal/pf.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/pflocal/ChangeLog b/pflocal/ChangeLog
index fd2765b7..0215ad3d 100644
--- a/pflocal/ChangeLog
+++ b/pflocal/ChangeLog
@@ -2,6 +2,10 @@
* io.c: Add #include <sys/mman.h> for munmap decl.
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * pf.c (S_socket_whatis_address): Use mmap instead of vm_allocate.
+
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* io.c (TRASH_IDS): Use munmap instead of vm_deallocate.
diff --git a/pflocal/pf.c b/pflocal/pf.c
index 71467ef7..65d5c5a9 100644
--- a/pflocal/pf.c
+++ b/pflocal/pf.c
@@ -113,7 +113,7 @@ S_socket_whatis_address (struct addr *addr,
*sockaddr_type = AF_LOCAL;
if (*sockaddr_len < addr_len)
- vm_allocate (mach_task_self (), (vm_address_t *) sockaddr, addr_len, 1);
+ *sockaddr = mmap (0, addr_len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
((struct sockaddr *) *sockaddr)->sa_len = addr_len;
((struct sockaddr *) *sockaddr)->sa_family = *sockaddr_type;
((struct sockaddr *) *sockaddr)->sa_data[0] = 0;