]> git.ozlabs.org Git - ccan/blobdiff - ccan/failtest/failtest_override.h
failtest: handle 2-argument open()
[ccan] / ccan / failtest / failtest_override.h
index dd328b508a5433911888affaa0f4e73227fdd67c..3bd0f8fc2443d43a9459ac96529b6792687c0623 100644 (file)
@@ -24,8 +24,8 @@
 #include <unistd.h>
 
 #undef open
-#define open(pathname, flags, ...) \
-       failtest_open((pathname), (flags), __FILE__, __LINE__, __VA_ARGS__)
+#define open(pathname, ...) \
+       failtest_open((pathname), __FILE__, __LINE__, __VA_ARGS__)
 
 #undef pipe
 #define pipe(pipefd) \
@@ -42,6 +42,9 @@
 #undef close
 #define close(fd) failtest_close(fd)
 
+#undef fcntl
+#define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__)
+
 #include <ccan/failtest/failtest_proto.h>
 
 #endif /* CCAN_FAILTEST_OVERRIDE_H */