Skip to contentSkip to conversation

libglib2: fix build with or1k

PATCH New Fabrice Fontaine 2 participants 2 messages Apr 10, 2018 – Apr 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libglib2: fix build with or1k

Fixes:
- http://autobuild.buildroot.net/results/398490e07343a931b25ca6ab5c90a75d7a073e9f

---
 ...-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/libglib2/0003-gio-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch
package/libglib2/0003-gio-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch new file +43 -0
new file mode 100644
index 0000000000..b5966c4f93
@@ -0,0 +1,43 @@
+From badc194631867f07e4dfcb8f01c4a3f8046ee6c6 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 10 Apr 2018 18:55:11 +0200
+Subject: [PATCH] gio: fix compilation without F_{S,G}ETPIPE_SZ
+
+Commit a5778ef7c51044147fe470ea1707dd297f44f880 broke compilation on
+architectures without F_SETPIPE_SZ and F_GETPIPE_SZ such as or1k.
+If those variables are undefined, put back previous behavior, buffer
+size set to 1024 * 64
+
+Fixes:
+ - http://autobuild.buildroot.net/results/398490e07343a931b25ca6ab5c90a75d7a073e9f
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ gio/gfile.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gio/gfile.c b/gio/gfile.c
+index 334ad8ec3..4df16b7a3 100644
+--- a/gio/gfile.c
++++ b/gio/gfile.c
+@@ -3012,6 +3012,7 @@ splice_stream_with_progress (GInputStream           *in,
+   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,9 @@ splice_stream_with_progress (GInputStream           *in,
+           goto out;
+         }
+     }
++#else
++  buffer_size = 1024 * 64;
++#endif
+ 
+   g_assert (buffer_size > 0);
+ 
+-- 
+2.14.1
+
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 libglib2: fix build with or1k

Hello,

Quoted 19 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.net/results/398490e07343a931b25ca6ab5c90a75d7a073e9f

---
 ...-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/libglib2/0003-gio-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch
package/libglib2/0003-gio-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch new file +4 -0
new file mode 100644
index 0000000000..b5966c4f93
@@ -0,0 +1,43 @@
+From badc194631867f07e4dfcb8f01c4a3f8046ee6c6 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Tue, 10 Apr 2018 18:55:11 +0200
+Subject: [PATCH] gio: fix compilation without F_{S,G}ETPIPE_SZ

package/libglib2/0003-gio-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch line 14

Quoted 10 lines
package/libglib2/0003-gio-fix-compilation-without-F_-S-G-ETPIPE_SZ.patch new file +10 -0
+
+Commit a5778ef7c51044147fe470ea1707dd297f44f880 broke compilation on
+architectures without F_SETPIPE_SZ and F_GETPIPE_SZ such as or1k.
+If those variables are undefined, put back previous behavior, buffer
+size set to 1024 * 64
+
+Fixes:
+ - http://autobuild.buildroot.net/results/398490e07343a931b25ca6ab5c90a75d7a073e9f
+
+Signed-off-by: Fabrice Fontaine <[email protected]>

I'm not sure this is the right fix. The lack of F_{SETPIPE,GETPIPE}_SZ is really a bug in uClibc-ng. So I've instead sent a patch to uClibc-ng to fix this:

https://patchwork.ozlabs.org/patch/897804/

If Waldemar applies it, we can have it temporarily in package/uclibc/, until a new uClibc-ng release is done.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com