]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
configure.ac, lib/: Use __has_include(<sys/random.h>) instead of HAVE_SYS_RANDOM_H
authorAlejandro Colomar <alx@kernel.org>
Tue, 12 Nov 2024 13:34:36 +0000 (14:34 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sat, 8 Feb 2025 05:43:55 +0000 (23:43 -0600)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/csrand.c

index c82b465095ca9e1dc5edf2bc389fb463bc4792db..42a0a12d20a738612aa61dc1f4a08448bf77b2f0 100644 (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)
 
index 1914a30368e5c8b90c5413298950bbcec535db39..def32be2e4ffc5f887a03aa97604339cefe146ab 100644 (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"