]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Check for getrandom
authorAki Tuomi <aki.tuomi@dovecot.fi>
Wed, 23 Aug 2017 09:53:50 +0000 (12:53 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Thu, 7 Sep 2017 08:40:31 +0000 (11:40 +0300)
configure.ac
m4/random.m4 [new file with mode: 0644]

index 8349c1d35c0da34cf804fe541c813ed8db14956e..828c2d6b91be7aca65efb677b3c2c1ee1233f7c4 100644 (file)
@@ -325,6 +325,7 @@ DOVECOT_FDATASYNC
 DOVECOT_LIBCAP
 DOVECOT_LIBWRAP
 
+DOVECOT_RANDOM
 DOVECOT_ARC4RANDOM
 
 AC_DEFINE(PACKAGE_WEBPAGE, "http://www.dovecot.org/", [Support URL])
diff --git a/m4/random.m4 b/m4/random.m4
new file mode 100644 (file)
index 0000000..7840f83
--- /dev/null
@@ -0,0 +1,6 @@
+AC_DEFUN([DOVECOT_RANDOM],[
+       AC_CHECK_HEADER([sys/random.h], [
+          AC_CHECK_FUNCS([getrandom])
+          AC_CHECK_DECLS([getrandom], [], [], [[#include <sys/random.h>]])
+        ])
+])