summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorLuca Bacci <luca.bacci982@gmail.com>2022-10-14 17:04:37 +0200
committerLuca Bacci <luca.bacci982@gmail.com>2022-10-28 12:44:45 +0200
commit392b2b02f71c1dcb1221077e8665466100f558c8 (patch)
tree31e81dcb46414be29f430348eb1f5363b65616b8 /perf
parentc75220fe089f649a7179520b2969da43d8e0e8b3 (diff)
downloadcairo-392b2b02f71c1dcb1221077e8665466100f558c8.tar.gz
perf: fix compilation on Win32
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-perf-graph-files.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/perf/cairo-perf-graph-files.c b/perf/cairo-perf-graph-files.c
index 1fd99e4ad..ef98da973 100644
--- a/perf/cairo-perf-graph-files.c
+++ b/perf/cairo-perf-graph-files.c
@@ -30,9 +30,12 @@
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <errno.h>
+
+#ifdef G_OS_UNIX
+#include <unistd.h>
#include <fcntl.h>
+#endif
#include <cairo.h>
@@ -232,6 +235,8 @@ show_case_toggled (GtkCellRendererToggle *cell,
graph_view_update_visible ((GraphView *) app->gv);
}
+#ifdef G_OS_UNIX
+
static gboolean
git_read (GIOChannel *io,
GIOCondition cond,
@@ -300,6 +305,8 @@ do_git (struct _app_data *app,
g_io_add_watch (app->git_io, G_IO_IN | G_IO_HUP, (GIOFunc) git_read, app);
}
+#endif
+
static void
gv_report_selected (GraphView *gv,
int i,
@@ -327,7 +334,11 @@ gv_report_selected (GraphView *gv,
argv[3] = id;
argv[4] = NULL;
+#ifdef G_OS_UNIX
do_git (app, argv);
+#else
+ g_print ("id: %s\n", id);
+#endif
g_free (id);
}
}