[gtk/async-highlight: 2/3] gtk-demo: Fix the Windows build
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/async-highlight: 2/3] gtk-demo: Fix the Windows build
- Date: Thu, 13 Aug 2020 20:33:29 +0000 (UTC)
commit a0cdb544ed99ebabe7f60df88e67ece5a2f8408f
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 13 15:49:45 2020 -0400
gtk-demo: Fix the Windows build
demos/gtk-demo/fontify.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/demos/gtk-demo/fontify.c b/demos/gtk-demo/fontify.c
index ce8efe51a7..2b9db1d728 100644
--- a/demos/gtk-demo/fontify.c
+++ b/demos/gtk-demo/fontify.c
@@ -8,8 +8,10 @@
#include <gtk/gtk.h>
#include <glib/gstdio.h>
+#ifdef HAVE_GIO_UNIX
#include <gio/gunixoutputstream.h>
#include <fcntl.h>
+#endif
/* This is the guts of gtk_text_buffer_insert_markup,
@@ -389,6 +391,7 @@ fontify (const char *format,
text = gtk_text_buffer_get_text (source_buffer, &start, &end, TRUE);
bytes = g_bytes_new_static (text, strlen (text));
+#ifdef HAVE_GIO_UNIX
/* Work around https://gitlab.gnome.org/GNOME/glib/-/issues/2182 */
if (G_IS_UNIX_OUTPUT_STREAM (g_subprocess_get_stdin_pipe (subprocess)))
{
@@ -396,6 +399,7 @@ fontify (const char *format,
int fd = g_unix_output_stream_get_fd (G_UNIX_OUTPUT_STREAM (stdin_pipe));
fcntl (fd, F_SETFL, O_NONBLOCK);
}
+#endif
g_subprocess_communicate_async (subprocess,
bytes,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]