summaryrefslogtreecommitdiff
path: root/mach/devstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'mach/devstream.c')
-rw-r--r--mach/devstream.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mach/devstream.c b/mach/devstream.c
index ba1c01b4e0..505b6573ae 100644
--- a/mach/devstream.c
+++ b/mach/devstream.c
@@ -1,6 +1,6 @@
/* stdio on a Mach device port.
Translates \n to \r\n on output, echos and translates \r to \n on input.
- Copyright (C) 1992-2016 Free Software Foundation, Inc.
+ Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -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;
}