X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.c;h=b3ee0337ebd96cfb7fe9a3b7cd3114fe473404c8;hp=104628352dd580a61e22bb5ff0743b35e0267ad5;hb=48b700953f9c856102e91596103238f5da9ea079;hpb=a85a809bb17af6b6cf6fa31b300c6622f64ee700 diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 10462835..b3ee0337 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -1177,6 +1177,15 @@ void *failtest_mmap(void *addr, size_t length, int prot, int flags, return p->u.mmap.ret; } +/* Since OpenBSD can't handle adding args, we use this file and line. + * This will make all mmaps look the same, reducing coverage. */ +void *failtest_mmap_noloc(void *addr, size_t length, int prot, int flags, + int fd, off_t offset) +{ + return failtest_mmap(addr, length, prot, flags, fd, offset, + __FILE__, __LINE__); +} + static void cleanup_pipe(struct pipe_call *call, bool restore) { trace("cleaning up pipe fd=%i%s,%i%s\n",