Don't include Unix headers or use Unix functions when building with MSVC.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
#include "tgsi/tgsi_scan.h"
#include "util/os_time.h"
#include <inttypes.h>
+#include "pipe/p_config.h"
static void
static void
dd_dump_dmesg(FILE *f)
{
+#ifdef PIPE_OS_LINUX
char line[2000];
FILE *p = popen("dmesg | tail -n60", "r");
fputs(line, f);
pclose(p);
+#endif
}
static unsigned
static void
dd_kill_process(void)
{
+#ifdef PIPE_OS_UNIX
sync();
+#endif
fprintf(stderr, "dd: Aborting the process...\n");
fflush(stdout);
fflush(stderr);
#include <stdio.h>
#include <errno.h>
-#include <unistd.h>
-#include <sys/stat.h>
#include "c99_alloca.h"
#include "os/os_process.h"
#include "util/u_atomic.h"
#include "util/u_debug.h"
+#include "pipe/p_config.h"
+#ifdef PIPE_OS_UNIX
+#include <unistd.h>
+#include <sys/stat.h>
+#endif
+
+
/* name of the directory in home */
#define DD_DIR "ddebug_dumps"