about summary refs log tree commit diff
path: root/mach
diff options
context:
space:
mode:
Diffstat (limited to 'mach')
-rw-r--r--mach/devstream.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mach/devstream.c b/mach/devstream.c
index 21d9f7bda3..505b6573ae 100644
--- a/mach/devstream.c
+++ b/mach/devstream.c
@@ -22,6 +22,7 @@
 #include <device/device.h>
 #include <errno.h>
 #include <string.h>
+#include <libioP.h>
 
 
 static ssize_t
@@ -111,7 +112,7 @@ devstream_read (void *cookie, char *buffer, size_t to_read)
 static int
 dealloc_ref (void *cookie)
 {
-  if (mach_port_deallocate (mach_task_self (), (mach_port_t) cookie))
+  if (__mach_port_deallocate (mach_task_self (), (mach_port_t) cookie))
     {
       errno = EINVAL;
       return -1;
@@ -130,13 +131,13 @@ mach_open_devstream (mach_port_t dev, const char *mode)
       return NULL;
     }
 
-  stream = fopencookie ((void *) dev, mode,
-			(cookie_io_functions_t) { write: devstream_write,
-						  read: devstream_read,
-						  close: dealloc_ref });
+  stream = _IO_fopencookie ((void *) dev, mode,
+			    (cookie_io_functions_t) { write: devstream_write,
+						      read: devstream_read,
+						      close: dealloc_ref });
   if (stream == NULL)
     {
-      mach_port_deallocate (mach_task_self (), dev);
+      __mach_port_deallocate (mach_task_self (), dev);
       return NULL;
     }