Files
libfaketime/test/snippets/getentropy.c
Daniel Kahn Gillmor 26b4b395e9 Include a check for getentropy interception
This snippet applies to both the library constructors and variable
data test frameworks.
2021-02-25 23:17:25 -05:00

7 lines
219 B
C

unsigned int targ;
if (getentropy(&targ, sizeof(targ)) == 0) {
printf("[%s] getentropy() yielded 0x%08x\n", where, targ);
} else {
printf("[%s] getentropy() failed with %d (%s)\n", where, errno, strerror(errno));
}