0

我正在使用内核版本 2.6.32 开发 Red Hat 6,我正在尝试在我的机器上构建 glib 2.5。并因以下错误而失败:-

日志:-

../../gio/gfile.c: In function ‘splice_stream_with_progress’:
../../gio/gfile.c:3019: error: ‘F_SETPIPE_SZ’ undeclared (first use in this function)
../../gio/gfile.c:3019: error: (Each undeclared identifier is reported only once
../../gio/gfile.c:3019: error: for each function it appears in.)
../../gio/gfile.c:3023: error: ‘F_GETPIPE_SZ’ undeclared (first use in this function)
make[4]: *** [libgio_2_0_la-gfile.lo] Error 1

我可以在F_SETPIPE_SZ undeclared找到解决方案,放在#define _GNU_SOURCE文件 gfile.c 中的所有包含之前,但它没有用。如第二个答案所述:较旧的内核(例如 RHEL6 中使用的 2.6.32)没有它们,我们需要在您正在构建的任何内容中绕过它。我们怎么能这样做?

感谢你的帮助 。

提前致谢。

4

1 回答 1

0

该错误已在此提交中修复。

没有 F_SETPIPE_SZ 和 F_GETPIPE_SZ 的架构,例如 or1k。如果这些变量未定义,则放回以前的行为,缓冲区大小设置为 1024 * 64

https://gitlab.gnome.org/GNOME/glib/-/commit/0beb62f564072f3585762c9c55fe894485993b62

您可以将补丁应用于您的代码。

于 2020-03-29T10:34:18.747 回答