summaryrefslogtreecommitdiff
path: root/tests/stubs.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-24 04:56:27 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-10-24 04:56:27 +0200
commit6ab9188d0cec3d887f537894ed669fe803049746 (patch)
treef70827d8423ed4d496cb7d20ca12d82a9dc37ef9 /tests/stubs.c
parent1aa3411546ec370d600699906b7336eff665c077 (diff)
Implement a tiny mmap wrapper ourselves, replacing libowfat's wrapper
Diffstat (limited to 'tests/stubs.c')
-rw-r--r--tests/stubs.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/stubs.c b/tests/stubs.c
index febdd7b..ce93071 100644
--- a/tests/stubs.c
+++ b/tests/stubs.c
@@ -14,21 +14,7 @@
14void free_peerlist(ot_peerlist *peer_list) { (void)peer_list; } 14void free_peerlist(ot_peerlist *peer_list) { (void)peer_list; }
15 15
16/* ot_accesslist.c is built with WANT_ACCESSLIST_BLACK so that the hash parser 16/* ot_accesslist.c is built with WANT_ACCESSLIST_BLACK so that the hash parser
17 is reachable. These four belong to accesslist_readfile and the reload 17 is reachable. These two belong to accesslist_readfile and the reload worker,
18 worker, neither of which any test drives. */ 18 neither of which any test drives. */
19time_t g_now_seconds; 19time_t g_now_seconds;
20volatile int g_opentracker_running; 20volatile int g_opentracker_running;
21
22const char *mmap_read(const char *filename, size_t *filesize);
23const char *mmap_read(const char *filename, size_t *filesize) {
24 (void)filename;
25 *filesize = 0;
26 return NULL;
27}
28
29int mmap_unmap(const char *mapped, size_t maplen);
30int mmap_unmap(const char *mapped, size_t maplen) {
31 (void)mapped;
32 (void)maplen;
33 return 0;
34}