F_SETPIPE_SZ未申报 [英] F_SETPIPE_SZ undeclared

查看:1182
本文介绍了F_SETPIPE_SZ未申报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经包括以下标题:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

我也试过用

#define _GNU_SOURCE

的#include&LT; unistd.h中方式&gt; ,但它也没有帮助

我尝试使用的fcntl 并把它传递 F_SETPIPE_SZ 作为第二个参数,但我不断收到此错误信息:

I try to use fcntl and pass it F_SETPIPE_SZ as second argument, but I keep getting this error message:

错误:'F_SETPIPE_SZ'未申报(在一次使用此功能)

error: ‘F_SETPIPE_SZ’ undeclared (first use in this function)

我居然发现我不需要这个,但我只是好奇,为什么我不能使用它。

I actually found out that I don't need this, but I'm just curious why I can't use it.

感谢您。

所以这里的解决方案,这要归功于计时狐狸:

So here's solution, thanks to Chrono Kitsune: Put

 #define _GNU_SOURCE

在任何包含

推荐答案

因此​​,这里的<一个href=\"http://stackoverflow.com/questions/25411892/f-setpipe-sz-undeclared#comment39643122_25411892\">solution,由于计时狐狸

So here's the solution, thanks to Chrono Kitsune:

#define _GNU_SOURCE

在任何包含

您还应该注意计时狐狸的其他<一个href=\"http://stackoverflow.com/questions/25411892/f-setpipe-sz-undeclared#comment39682023_25411892\">comment.

You should also pay attention to Chrono Kitsune's other comment.

这篇关于F_SETPIPE_SZ未申报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆