Opt-out the code using mkdir() and getpid() which are spitting
warnings in the MSVC build:
Compiling src\gallium\auxiliary\driver_ddebug\dd_draw.c ...
dd_draw.c
c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(62): warning
C4013: 'mkdir' undefined; assuming extern returning int
c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(65): warning
C4013: 'getpid' undefined; assuming extern returning int
Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to
improve build times")
Cc: Marek Olšák <[email protected]>
Cc: Brian Paul <[email protected]>
Cc: Roland Scheidegger <[email protected]>
Cc: Nicolai Hähnle <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
---
src/gallium/auxiliary/driver_ddebug/dd_util.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/auxiliary/driver_ddebug/dd_util.h
b/src/gallium/auxiliary/driver_ddebug/dd_util.h
index 7720e9af9ca..681627c83cb 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_util.h
+++ b/src/gallium/auxiliary/driver_ddebug/dd_util.h
@@ -60,11 +60,15 @@ dd_get_debug_filename_and_mkdir(char *buf, size_t buflen,
bool verbose)
util_snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", "."));
+#ifdef PIPE_OS_UNIX
if (mkdir(dir, 0774) && errno != EEXIST)
fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
util_snprintf(buf, buflen, "%s/%s_%u_%08u", dir, proc_name, getpid(),
p_atomic_inc_return(&index) - 1);
+#else
+ fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
+#endif
if (verbose)
fprintf(stderr, "dd: dumping to file %s\n", buf);
--
2.18.0
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev