diff --git a/meson.build b/meson.build index 6b81203168..d9fb8fb613 100644 --- a/meson.build +++ b/meson.build @@ -773,7 +773,6 @@ endif foreach header : ['crypt.h', 'linux/ioprio.h', 'linux/time_types.h', - 'sys/auxv.h', 'sys/sdt.h', 'threads.h', 'valgrind/memcheck.h', diff --git a/src/basic/random-util.c b/src/basic/random-util.c index 4069b290d5..0b767a8500 100644 --- a/src/basic/random-util.c +++ b/src/basic/random-util.c @@ -8,13 +8,10 @@ #include #include #include +#include #include #include -#if HAVE_SYS_AUXV_H -# include -#endif - #include "alloc-util.h" #include "env-util.h" #include "errno-util.h" @@ -31,7 +28,7 @@ #include "sha256.h" #include "time-util.h" -/* This is a "best effort" kind of thing, but has no real security value. So, this should only be used by +/* This is a "best effort" kind of thing, but has no real security value. So, this should only be used by * random_bytes(), which is not meant for crypto. This could be made better, but we're *not* trying to roll a * userspace prng here, or even have forward secrecy, but rather just do the shortest thing that is at least * better than libc rand(). */ @@ -53,9 +50,7 @@ static void fallback_random_bytes(void *p, size_t n) { .tid = gettid(), }; -#if HAVE_SYS_AUXV_H memcpy(state.auxval, ULONG_TO_PTR(getauxval(AT_RANDOM)), sizeof(state.auxval)); -#endif while (n > 0) { struct sha256_ctx ctx;