summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/backtrace.c7
-rw-r--r--os/utils.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/os/backtrace.c b/os/backtrace.c
index 76aa6b2f3..4c57c6fe6 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -31,7 +31,9 @@
#include <string.h>
#include <sys/types.h>
+#if !defined(__WIN32__) || defined(__CYGWIN__)
#include <sys/wait.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -160,6 +162,10 @@ xorg_backtrace_frame(uintptr_t pc, int signo, void *arg)
static int
xorg_backtrace_exec_wrapper(const char *path)
{
+#if defined(WIN32) && !defined(__CYGWIN__)
+ ErrorFSigSafe("Backtrace not implemented on Windows");
+ return -1;
+#else
pid_t kidpid;
int pipefd[2];
@@ -218,6 +224,7 @@ xorg_backtrace_exec_wrapper(const char *path)
}
}
return 0;
+#endif
}
#ifdef HAVE_PSTACK
diff --git a/os/utils.c b/os/utils.c
index 7d81d6945..19e266836 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1665,7 +1665,7 @@ Win32TempDir(void)
if (getenv("TEMP") != NULL)
return getenv("TEMP");
else if (getenv("TMP") != NULL)
- return getenv("TEMP");
+ return getenv("TMP");
else
return "/tmp";
}