[PATCH vkd3d 1/2] vkd3d-shader: Define S_ISREG if necessary for the Windows build.

Alexandre Julliard julliard at winehq.org
Tue Feb 8 08:09:29 CST 2022


Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
 libs/vkd3d-shader/preproc.y | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libs/vkd3d-shader/preproc.y b/libs/vkd3d-shader/preproc.y
index ac6f6479c4c2..3f02ac03612b 100644
--- a/libs/vkd3d-shader/preproc.y
+++ b/libs/vkd3d-shader/preproc.y
@@ -48,6 +48,10 @@ int preproc_yylex(PREPROC_YYSTYPE *yylval_param, PREPROC_YYLTYPE *yylloc_param,
 
 #define YYLLOC_DEFAULT(cur, rhs, n) (cur) = YYRHSLOC(rhs, !!n)
 
+#ifndef S_ISREG
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
 static void preproc_error(struct preproc_ctx *ctx, const struct vkd3d_shader_location *loc,
         enum vkd3d_shader_error error, const char *format, ...)
 {
-- 
2.34.1



More information about the wine-devel mailing list