File: getrandom.m4

package info (click to toggle)
nfs-utils 1%3A2.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,380 kB
  • sloc: ansic: 52,371; sh: 5,775; python: 2,166; makefile: 973
file content (16 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
dnl Checks for getrandom support (glibc 2.25+, musl 1.1.20+)
dnl
AC_DEFUN([AC_GETRANDOM], [
    AC_MSG_CHECKING(for getrandom())
    AC_LINK_IFELSE(
		[AC_LANG_PROGRAM([[
		   #include <stdlib.h>  /* for NULL */
		   #include <sys/random.h>
		]],
		[[ return getrandom(NULL, 0U, 0U); ]] )],
		[AC_DEFINE([HAVE_GETRANDOM], [1], [Define to 1 if you have the `getrandom' function.])
		AC_MSG_RESULT([yes])],
		[AC_MSG_RESULT([no])])

	AC_SUBST(HAVE_GETRANDOM)
])