Merge pull request #3085 from bluca/getrandom_test

Problem: getrandom test does not check if it's working
This commit is contained in:
Simon Giesecke 2018-05-11 09:51:43 +02:00 committed by GitHub
commit 5fe783070b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -883,7 +883,8 @@ AC_DEFUN([LIBZMQ_CHECK_GETRANDOM], [{
int main (int argc, char *argv [])
{
char buf[4];
getrandom(buf, 4, 0);
int rc = getrandom(buf, 4, 0);
return rc == -1 ? 1 : 0;
}
],
[libzmq_cv_getrandom="yes"],

View File

@ -287,7 +287,8 @@ macro(zmq_check_getrandom)
int main (int argc, char *argv [])
{
char buf[4];
getrandom(buf, 4, 0);
int rc = getrandom(buf, 4, 0);
return rc == -1 ? 1 : 0;
}
"
ZMQ_HAVE_GETRANDOM)