aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--sysdeps/mach/hurd/mmap.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 57c2b273c7..78ae230428 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-09-05 Roland McGrath <roland@redhat.com>
+
+ * nss/getXXbyYY.c (FUNCTION_NAME): Remove unused variable.
+
+2003-09-04 Roland McGrath <roland@frob.com>
+
+ * sysdeps/mach/hurd/mmap.c (__mmap): If io_map fails with MIG_BAD_ID,
+ EOPNOTSUPP, or ENOSYS, change it to ENODEV.
+
2003-09-04 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/ia64/bits/sigstack.h (MINSIGSTKSZ):
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index c54bc0c188..85bde529b9 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994,95,96,97,99,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1995,1996,1997,1999,2002,2003
+ 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
@@ -97,7 +98,11 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
mach_port_t robj, wobj;
if (err = HURD_DPORT_USE (fd, __io_map (port, &robj, &wobj)))
- return (__ptr_t) (long int) __hurd_dfail (fd, err);
+ {
+ if (err == MIG_BAD_ID || err == EOPNOTSUPP || err == ENOSYS)
+ err = ENODEV; /* File descriptor doesn't support mmap. */
+ return (__ptr_t) (long int) __hurd_dfail (fd, err);
+ }
switch (prot & (PROT_READ|PROT_WRITE))
{
case PROT_READ: