summaryrefslogtreecommitdiff
path: root/ftpfs/netfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ftpfs/netfs.c')
-rw-r--r--ftpfs/netfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ftpfs/netfs.c b/ftpfs/netfs.c
index a7c8f7a0..ced7310a 100644
--- a/ftpfs/netfs.c
+++ b/ftpfs/netfs.c
@@ -180,7 +180,9 @@ get_dirents (struct ftpfs_dir *dir,
? DIRENTS_CHUNK_SIZE
: max_data_len);
- err = vm_allocate (mach_task_self (), (vm_address_t *) data, size, 1);
+ *data = mmap (0, size, PROT_READ|PROT_WRITE,
+ MAP_ANON, 0, 0);
+ err = ((void *) *data == (void *) -1) ? errno : 0;
if (! err)
{