+#undef mmap
+/* OpenBSD doesn't idempotent-protect sys/mman.h, so we can't add args. */
+#ifdef __OpenBSD__
+#define mmap(addr, length, prot, flags, fd, offset) \
+ failtest_mmap_noloc((addr), (length), (prot), (flags), (fd), (offset))
+#else
+#define mmap(addr, length, prot, flags, fd, offset) \
+ failtest_mmap((addr), (length), (prot), (flags), (fd), (offset), \
+ __FILE__, __LINE__)
+#endif /* !__OpenBSD__ */
+
+#undef lseek
+#define lseek(fd, offset, whence) \
+ failtest_lseek((fd), (offset), (whence), __FILE__, __LINE__)
+
+/* Replacement of getpid (since failtest will fork). */
+#undef getpid
+#define getpid() failtest_getpid(__FILE__, __LINE__)
+