about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/mach/hurd/getrandom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/getrandom.c b/sysdeps/mach/hurd/getrandom.c
index 0d28f5c260..a7706afe82 100644
--- a/sysdeps/mach/hurd/getrandom.c
+++ b/sysdeps/mach/hurd/getrandom.c
@@ -123,8 +123,13 @@ again:
                                                     open_flags, 0);
       __libc_rwlock_unlock (lock);
       if (!MACH_PORT_VALID (server))
-        /* No luck.  */
-        return -1;
+	{
+	  if (errno == ENOENT)
+	    /* No translator set up, we won't have support for it.  */
+	    errno = ENOSYS;
+	  /* No luck.  */
+	  return -1;
+	}
 
       goto again;
     }