From 4cafe82945a6843cffd68bd5c1b538f6ccf21f68 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 11 Sep 2026 11:47:35 +0100 Subject: [PATCH] Mock getentropy (with ENOSYS) --- regress/hcommon.c.m4 | 5 +++++ regress/hsyscalls.i4 | 1 + 2 files changed, 6 insertions(+) diff --git a/regress/hcommon.c.m4 b/regress/hcommon.c.m4 index 3fd2a10..0ecf413 100644 --- a/regress/hcommon.c.m4 +++ b/regress/hcommon.c.m4 @@ -275,6 +275,11 @@ pid_t Hgetpid(void) { return 2264; /* just some number */ } +pid_t Hgetentropy(void *buffer, size_t length) { + errno= ENOSYS; + return -1; +} + void Tcommonshutdown(void) { Tshutdown(); adns__vbuf_free(&vb); diff --git a/regress/hsyscalls.i4 b/regress/hsyscalls.i4 index 852cc93..7f128fe 100644 --- a/regress/hsyscalls.i4 +++ b/regress/hsyscalls.i4 @@ -131,6 +131,7 @@ hm_specsyscall(int, writev, `int fd, const struct iovec *vector, size_t count') hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz') hm_specsyscall(int, clock_gettime, `clockid_t clk, struct timespec *ts') hm_specsyscall(pid_t, getpid, `void') +hm_specsyscall(int, getentropy, `void *buffer, size_t length') hm_specsyscall(int, close, `int fd') m4_define(hm_stdsyscall_close,` -- 2.30.2