about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/unix/sysv/linux/getentropy.c9
-rw-r--r--sysdeps/unix/sysv/linux/getrandom.c13
2 files changed, 0 insertions, 22 deletions
diff --git a/sysdeps/unix/sysv/linux/getentropy.c b/sysdeps/unix/sysv/linux/getentropy.c
index 5d0b8d10c1..2f3a4e4692 100644
--- a/sysdeps/unix/sysv/linux/getentropy.c
+++ b/sysdeps/unix/sysv/linux/getentropy.c
@@ -21,7 +21,6 @@
 #include <errno.h>
 #include <unistd.h>
 
-#ifdef __NR_getrandom
 /* Write LENGTH bytes of randomness starting at BUFFER.  Return 0 on
    success and -1 on failure.  */
 int
@@ -63,11 +62,3 @@ getentropy (void *buffer, size_t length)
     }
   return 0;
 }
-#else
-int
-getentropy (void *buffer, size_t length)
-{
-  __set_errno (ENOSYS);
-  return -1;
-}
-#endif
diff --git a/sysdeps/unix/sysv/linux/getrandom.c b/sysdeps/unix/sysv/linux/getrandom.c
index 309beadf72..63b8d36bf4 100644
--- a/sysdeps/unix/sysv/linux/getrandom.c
+++ b/sysdeps/unix/sysv/linux/getrandom.c
@@ -21,7 +21,6 @@
 #include <unistd.h>
 #include <sysdep-cancel.h>
 
-#ifdef __NR_getrandom
 /* Write up to LENGTH bytes of randomness starting at BUFFER.
    Return the number of bytes written, or -1 on error.  */
 ssize_t
@@ -29,17 +28,5 @@ __getrandom (void *buffer, size_t length, unsigned int flags)
 {
   return SYSCALL_CANCEL (getrandom, buffer, length, flags);
 }
-#else
-/* Always provide a definition, even if the kernel headers lack the
-   system call number. */
-ssize_t
-__getrandom (void *buffer, size_t length, unsigned int flags)
-{
-  /* Ideally, we would add a cancellation point here, but we currently
-     cannot do so inside libc.  */
-  __set_errno (ENOSYS);
-  return -1;
-}
-#endif
 libc_hidden_def (__getrandom)
 weak_alias (__getrandom, getrandom)