configure.ac, lib/: Use __has_include(<sys/random.h>) instead of HAVE_SYS_RANDOM_H

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar 2024-11-12 14:34:36 +01:00 committed by Serge Hallyn
parent 87ba6c317e
commit 0dcce8ea4b
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ dnl Checks for libraries.
dnl Checks for header files.
AC_CHECK_HEADERS(utmp.h \
termio.h sgtty.h sys/ioctl.h paths.h \
sys/capability.h sys/random.h \
sys/capability.h \
gshadow.h lastlog.h rpc/key_prot.h acl/libacl.h \
attr/libattr.h attr/error_context.h)

View File

@ -10,8 +10,8 @@
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#if HAVE_SYS_RANDOM_H
#include <sys/random.h>
#if __has_include(<sys/random.h>)
# include <sys/random.h>
#endif
#include "bit.h"