From ee807283d44de3c9acc4632a06a6bf17d1a73b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 6 Apr 2024 21:24:12 +0100 Subject: [PATCH] drop newly unused HAVE_GETENTROPY and HAVE_SYS_RANDOM_H MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caolán McNamara Change-Id: Iccfa44f56fb0d3b185df3c9c8457cf19d42f85f1 --- common/Util.cpp | 8 -------- config.h.in | 6 ------ configure.ac | 32 -------------------------------- 3 files changed, 46 deletions(-) diff --git a/common/Util.cpp b/common/Util.cpp index fb30a04bb2..ba8cc92911 100644 --- a/common/Util.cpp +++ b/common/Util.cpp @@ -20,14 +20,6 @@ #include -#ifdef HAVE_GETENTROPY -# include -#endif - -#ifdef HAVE_SYS_RANDOM_H -# include -#endif - #ifdef __linux__ # include # include diff --git a/config.h.in b/config.h.in index f83dc2a643..9d790f536f 100644 --- a/config.h.in +++ b/config.h.in @@ -106,9 +106,3 @@ /* Define to 1 if this is the WASM app build. */ #undef WASMAPP -/* Define to 1 if we have sys/random.h */ -#undef HAVE_SYS_RANDOM_H - -/* Define to 1 if we have a getentropy function */ -#undef HAVE_GETENTROPY - diff --git a/configure.ac b/configure.ac index 27cd1cfe74..65ce772b1c 100644 --- a/configure.ac +++ b/configure.ac @@ -1050,38 +1050,6 @@ AC_SUBST(HAVE_CLANG) AS_IF([test "$ENABLE_GTKAPP" != true], [CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXXSTD"]) -SYS_RANDOM= -AC_LANG_PUSH([C++]) -AC_LINK_IFELSE( - [AC_LANG_SOURCE([[ - #include - int main() - { - char buffer[8]; - getrandom(buffer, sizeof(buffer), GRND_NONBLOCK); - } - ]])], - [SYS_RANDOM=TRUE]) -AC_LANG_POP([C++]) - -if test "$SYS_RANDOM" == "TRUE" ; then - AC_DEFINE([HAVE_SYS_RANDOM_H],1,[Define to 1 if you have the header file.]) -else - AC_DEFINE([HAVE_SYS_RANDOM_H],0,[Define to 1 if you have the header file.]) -fi - -AC_LINK_IFELSE( - [AC_LANG_SOURCE([[ - #include - int main() - { - char buffer[8]; - getentropy(buffer, sizeof(buffer)); - } - ]])], - [AC_DEFINE([HAVE_GETENTROPY],1,[Define to 1 if you have getentropy() function in header file.])], - [AC_DEFINE([HAVE_GETENTROPY],0,[Define to 1 if you have getentropy() function in header file.])]) - AS_IF([test -n "$LOKIT_PATH"], [CPPFLAGS="$CPPFLAGS -I${LOKIT_PATH}"]) lokit_msg="$LOKIT_PATH"