lib/pattern: Support binary pattern buffers on windows
[fio.git] / lib / pattern.c
index 1ae05758f7684457ac1308db87e93e85593c56fe..9be29af6bcf591adea3323dafee9b48684002c44 100644 (file)
@@ -47,7 +47,11 @@ static const char *parse_file(const char *beg, char *out,
        if (file == NULL)
                goto err_out;
 
+#ifdef _WIN32
+       fd = open(file, O_RDONLY | O_BINARY);
+#else
        fd = open(file, O_RDONLY);
+#endif
        if (fd < 0)
                goto err_free_out;