After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795133 - gio build failure on or1k due to missing without F_{S,G}ETPIPE_SZ
gio build failure on or1k due to missing without F_{S,G}ETPIPE_SZ
Product: glib
Classification: Platform
Component: gio
Other Linux
: Normal critical
: ---
Assigned To: gtkdev
Depends on:
Reported: 2018-04-10 17:15 UTC by Fabrice Fontaine
Modified: 2018-04-11 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch fixing issue (1.36 KB, patch)
2018-04-10 17:15 UTC, Fabrice Fontaine
committed Details | Review

Description Fabrice Fontaine 2018-04-10 17:15:02 UTC
Created attachment 370737 [details] [review]
Patch fixing issue

Commit a5778ef7c51044147fe470ea1707dd297f44f880 broke compilation on
architectures without F_SETPIPE_SZ and F_GETPIPE_SZ such as or1k.

So, the attached fix the issue putting back previous behavior (buffer
size set to 1024 * 64) if those variables are undefined, 

Comment 1 Philip Withnall 2018-04-11 14:18:29 UTC
Review of attachment 370737 [details] [review]:

Thanks. A few review comments, but I’ll fix those before pushing.

::: gio/gfile.c
@@ +3013,3 @@
     return FALSE;
+#if defined(F_SETPIPE_SZ) && defined (F_GETPIPE_SZ)

Nitpick: s/defined (/defined(/ for consistency

@@ +3032,3 @@
+  buffer_size = 1024 * 64;

This could do with a comment explaining why we’re going for 64KiB rather than 1MiB. The reasoning, I assume, is because if F_GETPIPE_SZ is unavailable, that probably means we’re running on an older kernel, where the pipe capacity was 64KiB. See pipe(7).

I’ll add a comment before pushing.
Comment 2 Philip Withnall 2018-04-11 14:42:40 UTC
Pushed to master (with a comment added) as 0beb62f56, and to glib-2-56 as 1d2e685d9.