diff options
| author | Waldemar Brodkorb <wbx@openadk.org> | 2024-08-13 03:37:18 +0200 | 
|---|---|---|
| committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-08-13 03:50:22 +0200 | 
| commit | fd4df4b1ec88632e42675c2f50c86f649b69a00c (patch) | |
| tree | dd0f80c8ee5b945a0849a56175f4092d6bb1bd44 /libc/sysdeps/linux/common/sys/random.h | |
| parent | 811cd361e144dd7bdf75bcad8b4572ec786af5c7 (diff) | |
getrandom: remove __USE_GNU / add GRND_INSECURE
Neither glibc nor musl use __GNU macro to hide getrandom.
While there sync with glibc and add GRND_INSECURE flag.
Diffstat (limited to 'libc/sysdeps/linux/common/sys/random.h')
| -rw-r--r-- | libc/sysdeps/linux/common/sys/random.h | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/sys/random.h b/libc/sysdeps/linux/common/sys/random.h index 3d12744ad..3d24e439b 100644 --- a/libc/sysdeps/linux/common/sys/random.h +++ b/libc/sysdeps/linux/common/sys/random.h @@ -9,7 +9,7 @@  __BEGIN_DECLS -#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __USE_GNU +#if defined __UCLIBC_LINUX_SPECIFIC__  # if 0 /*def __ASSUME_GETRANDOM_SYSCALL */  #  include <linux/random.h>  # else @@ -20,9 +20,11 @@ __BEGIN_DECLS   *   * GRND_NONBLOCK	Don't block and return EAGAIN instead   * GRND_RANDOM		Use the /dev/random pool instead of /dev/urandom + * GRND_INSECURE	Write random data that may not be cryptographically secure.   */  #  define GRND_NONBLOCK	0x0001  #  define GRND_RANDOM	0x0002 +#  define GRND_INSECURE 0x0004  # endif  /* FIXME: aren't there a couple of __restrict and const missing ? */  extern int getrandom(void *__buf, size_t count, unsigned int flags)  | 
