作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我包含了以下标题:
#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 <unistd.h>
, 但它也无济于事。
我尝试使用 fcntl
并通过它 F_SETPIPE_SZ
作为第二个参数,但我不断收到此错误消息:
error: ‘F_SETPIPE_SZ’ undeclared (first use in this function)
其实我发现我不需要这个,但我只是好奇为什么我不能使用它。
谢谢。
所以这是解决方案,感谢 Chrono Kitsune:放
#define _GNU_SOURCE
在任何包含之前。
最佳答案
关于c - F_SETPIPE_SZ 未声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25411892/
我包含了以下标题: #include #include #include #include #include #include #include #include 我也尝试过使用 #d
我包含了以下标题: #include #include #include #include #include #include #include #include 我也试过用 #def
背景: 我正在尝试编写一个同时记录 JSONS 的小脚本,如果文件大小很小,则一切正常。但是当文件很大时,进程开始相互覆盖。这篇 SO 帖子有助于指出正确的方向:PIPE_BUFF . Windows
我是一名优秀的程序员,十分优秀!