GNOME Bugzilla – Bug 795133
gio build failure on or1k due to missing without F_{S,G}ETPIPE_SZ
Last modified: 2018-04-11 14:42:45 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, Fixes: - http://autobuild.buildroot.net/results/398490e07343a931b25ca6ab5c90a75d7a073e9f
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 @@ } +#else + 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.
Pushed to master (with a comment added) as 0beb62f56, and to glib-2-56 as 1d2e685d9.