blob: 03ccc2284f1b6b0c57d5c6588911180f32b9ad3b [file] [log] [blame] [edit]
diff -Naur evince-3.32.0-orig/libdocument/ev-file-helpers.c evince-3.32.0/libdocument/ev-file-helpers.c
--- evince-3.32.0-orig/libdocument/ev-file-helpers.c 2019-01-31 06:03:59.000000000 +0300
+++ evince-3.32.0/libdocument/ev-file-helpers.c 2019-06-11 22:40:13.048270000 +0300
@@ -39,6 +39,10 @@
#define O_BINARY 0
#endif
+#if !defined O_CLOEXEC && defined O_NOINHERIT
+# define O_CLOEXEC O_NOINHERIT
+#endif
+
/*
* ev_dir_ensure_exists:
* @dir: the directory name
@@ -595,6 +599,7 @@
#define N_ARGS 4
#define BUFFER_SIZE 1024
+#ifndef G_OS_WIN32
static void
compression_child_setup_cb (gpointer fd_ptr)
{
@@ -607,6 +612,7 @@
fcntl (fd, F_SETFD, flags);
}
}
+#endif
static gchar *
compression_run (const gchar *uri,
@@ -655,7 +661,11 @@
if (g_spawn_async_with_pipes (NULL, argv, NULL,
G_SPAWN_STDERR_TO_DEV_NULL,
+#ifdef G_OS_WIN32
+ NULL, NULL,
+#else
compression_child_setup_cb, GINT_TO_POINTER (fd),
+#endif
NULL,
NULL, &pout, NULL, &err)) {
GIOChannel *in, *out;