diff options
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/ChangeLog | 4 | ||||
-rw-r--r-- | pflocal/pf.c | 2 |
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; |