From: Bernhard Übelacker <bernhardu(a)mailbox.org> Documentation states pmode argument is needed when _O_CREAT is used. --- dlls/msvcrt/tests/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/tests/misc.c b/dlls/msvcrt/tests/misc.c index 7b54b3aeb88..02e68610b20 100644 --- a/dlls/msvcrt/tests/misc.c +++ b/dlls/msvcrt/tests/misc.c @@ -25,6 +25,7 @@ #include <stdio.h> #include <math.h> #include <process.h> +#include <sys/stat.h> static inline BOOL almost_equal(double d1, double d2) { if(d1-d2>-1e-30 && d1-d2<1e-30) @@ -364,7 +365,7 @@ static void test__popen(const char *name) tempf = _tempnam(".", "wne"); ok(tempf != NULL, "_tempnam failed\n"); - fd = _open(tempf, _O_CREAT | _O_WRONLY); + fd = _open(tempf, _O_CREAT | _O_WRONLY, _S_IWRITE); ok(fd != -1, "open failed\n"); sprintf(buf, "\"%s\" misc popen %d", name, fd); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7346