diff options
author | schmonz <schmonz@pkgsrc.org> | 2018-05-26 13:25:55 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2018-05-26 13:25:55 +0000 |
commit | fa9ee825516e314b59b1353a9e1410dd6ec986fd (patch) | |
tree | d04001a706ae7fb65db1c8a687d9eb0ba29c103d /devel/glib2 | |
parent | 2214667b0ac39677c264b84018f9b0badcbc7caa (diff) | |
download | pkgsrc-fa9ee825516e314b59b1353a9e1410dd6ec986fd.tar.gz |
Fix build on CentOS 6 (at least) with upstream patch for bug 795133.
Diffstat (limited to 'devel/glib2')
-rw-r--r-- | devel/glib2/distinfo | 3 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gio_gfile.c | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index 7be6d7c8a4d..5cb2adf90c8 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.232 2018/05/21 08:39:38 jperkin Exp $ +$NetBSD: distinfo,v 1.233 2018/05/26 13:25:55 schmonz Exp $ SHA1 (glib-2.56.1.tar.xz) = 4db098c15b9d57c37bb504a6f58ebe717994e6f2 RMD160 (glib-2.56.1.tar.xz) = da4e45bf52d28b610a71bed8b4331bfb0b5c8d56 @@ -21,6 +21,7 @@ SHA1 (patch-cd) = a8a90eca84a687400a92b0e26fafe4b9b6014ec3 SHA1 (patch-cl) = abe77225b2013b40d48a419b58ef4970165d0398 SHA1 (patch-cm) = 534af37ae8f2bd667f630142058d4de5ea91be93 SHA1 (patch-gio_gdbus-2.0_codegen_gdbus-codegen.in) = ccbb10335fb477e347993444d68d5e88d9e93050 +SHA1 (patch-gio_gfile.c) = 70ab8e438358c917958ef81c18f9f1d0c0ce37ff SHA1 (patch-gio_giomodule.c) = 08181ad8d46dde1a028faa246a4852e474610eaa SHA1 (patch-gio_glocalfileinfo.c) = 8e0b7e9543ce3c702c468f56e7ecf418d70b049f SHA1 (patch-gio_gresource-tool.c) = 4eb7c9df25e9ac3e977edf3be8fb977a6fb39182 diff --git a/devel/glib2/patches/patch-gio_gfile.c b/devel/glib2/patches/patch-gio_gfile.c new file mode 100644 index 00000000000..a770be00e9b --- /dev/null +++ b/devel/glib2/patches/patch-gio_gfile.c @@ -0,0 +1,28 @@ +$NetBSD: patch-gio_gfile.c,v 1.4 2018/05/26 13:25:55 schmonz Exp $ + +Fix build on CentOS 6 (at least) with upstream patch for bug 795133. + +--- gio/gfile.c.orig 2018-03-12 16:23:37.000000000 +0000 ++++ gio/gfile.c +@@ -3012,6 +3012,7 @@ splice_stream_with_progress (GInputStrea + if (!g_unix_open_pipe (buffer, FD_CLOEXEC, error)) + return FALSE; + ++#if defined(F_SETPIPE_SZ) && defined(F_GETPIPE_SZ) + /* Try a 1MiB buffer for improved throughput. If that fails, use the default + * pipe size. See: https://bugzilla.gnome.org/791457 */ + buffer_size = fcntl (buffer[1], F_SETPIPE_SZ, 1024 * 1024); +@@ -3029,6 +3030,13 @@ splice_stream_with_progress (GInputStrea + goto out; + } + } ++#else ++ /* If #F_GETPIPE_SZ isn’t available, assume we’re on Linux < 2.6.35, ++ * but ≥ 2.6.11, meaning the pipe capacity is 64KiB. Ignore the possibility of ++ * running on Linux < 2.6.11 (where the capacity was the system page size, ++ * typically 4KiB) because it’s ancient. See pipe(7). */ ++ buffer_size = 1024 * 64; ++#endif + + g_assert (buffer_size > 0); + |