Mailing List Archive

About Problem of Error when making "libgcrypt" [rndgetentropy.c ]
Dear. GnuPG-Users ML members

When making "libgcrypt ver1.10.2" and "libgcrypt ver1.8.10",
I got the following problem of error and the compilation could not proceed.
(Output is line-breaked where appropriate.)

---
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -g
-O2 -fno-delete-null-pointer-checks -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat
-Wno-format-y2k -Wformat-security -W -Wextra -Wbad-function-cast -Wwrite-strings
-Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith
-MT rndgetentropy.lo -MD -MP -MF .deps/rndgetentropy.Tpo -c rndgetentropy.c -fno-common
-DPIC -o .libs/rndgetentropy.orndgetentropy.c:98:21:
error: call to undeclared function 'getrandom'; ISO C99 and later do not support implicit
function declarations [-Wimplicit-function-declaration]
ret = getrandom (buffer, nbytes, GRND_RANDOM);
^
rndgetentropy.c:98:48: error: use of undeclared identifier 'GRND_RANDOM'
ret = getrandom (buffer, nbytes, GRND_RANDOM);
^
2 errors generated.
make[2]: *** [rndgetentropy.lo] Error 1
make[2]: Leaving directory `/Users/take/Downloads/GnuPG/libgcrypt-1.10.2/random'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/take/Downloads/GnuPG/libgcrypt-1.10.2'
make: *** [all] Error 2
---

Unfortunately I don't know how to make this 'make' passable.

Could you please advise how to bypass this error?

My environment is as follows.
Also, ". /configure" output is attached.

OS : macOS 13.3.1 (a) / Command Line Tools for Xcode 14.3
Platform : Darwin (x86_64-apple-darwin22.4.0)

Sincerely yours.
---
WATANABE, Takeo
take@kasaneiro.jp

C