swoole 扩展 make 安装时遇到的问题

最开始我是使用brew安装环境的,但是在执行下面这句话的时候提示:“No formula found for "swoole".”

brew search swoole

然后使用pecl 进行安装

pecl install swoole

又出错:

No releases available for package "pecl.php.net/swoole"
install failed

最后选择make安装

/Users/xxx/package/swoole/src/os/sendfile.c:23:5: error: conflicting types for 'swoole_sendfile'
int swoole_sendfile(int out_fd, int in_fd, off_t offset, off_t size)
/Users/xxx/package/swoole/include/swoole.h:2166:5: note: previous declaration is here
int swoole_sendfile(int out_fd, int in_fd, off_t
offset, size_t size);

一路很不顺利,然后我就去看了这两个文件的出错了的地方

sendfile.c

int swoole_sendfile(int out_fd, int in_fd, off_t *offset, off_t size)

swoole.h

#if defined(HAVE_KQUEUE) || !defined(HAVE_SENDFILE)
int swoole_sendfile(int out_fd, int in_fd, off_t *offset, size_t size);
#else

然后我发现最后的这个size的类型不一致,我尝试将下面的 size_t 改为 off_t
最后make成功了.....

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!