diff options
| author | Mattias Andrée <m@maandree.se> | 2026-05-12 21:22:54 +0200 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-05-12 21:22:54 +0200 |
| commit | fc0b70a60407e1e65610712a702f8286db3a328c (patch) | |
| tree | 05f42c75245c1160c4bf7a7d391de7a16b109c83 /libtest/alloc_have_custom.c | |
| parent | Misc (diff) | |
| download | librecrypt-fc0b70a60407e1e65610712a702f8286db3a328c.tar.gz librecrypt-fc0b70a60407e1e65610712a702f8286db3a328c.tar.bz2 librecrypt-fc0b70a60407e1e65610712a702f8286db3a328c.tar.xz | |
Work on test code
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libtest/alloc_have_custom.c')
| -rw-r--r-- | libtest/alloc_have_custom.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libtest/alloc_have_custom.c b/libtest/alloc_have_custom.c index 9c213bb..0800e5e 100644 --- a/libtest/alloc_have_custom.c +++ b/libtest/alloc_have_custom.c @@ -26,6 +26,9 @@ char *(strndup)(const char *s, size_t n); wchar_t *(wcsdup)(const wchar_t *s); wchar_t *(wcsndup)(const wchar_t *s, size_t n); void *(memdup)(const void *s, size_t n); +void *(mmap)(void *addr, size_t len, int prot, int flags, int fd, off_t off); +int (munmap)(void *addr, size_t len); +void *(mremap)(void *old_addr, size_t old_len, size_t new_len, int flags, ...); #if defined(__GNUC__) # pragma GCC diagnostic pop @@ -210,6 +213,16 @@ libtest_have_custom_free_aligned_sized(void) } +int +libtest_have_custom_mmap(void) +{ + static int r = -1; + if (r < 0) + r = libtest_check_custom_mmap(); + return r; +} + + #else @@ -243,6 +256,7 @@ main(void) CHECK(libtest_have_custom_wcsdup); CHECK(libtest_have_custom_wcsndup); CHECK(libtest_have_custom_memdup); + CHECK(libtest_have_custom_mmap); return 0; } |
