4 Star 0 Fork 23

src-openEuler/erlang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
otp-0011-configure.ac-C99-fixes-for-poll_works-check.patch 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
Funda Wang 提交于 1个月前 . 26.2.5.9
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 24 Nov 2022 11:59:22 +0100
Subject: [PATCH] configure.ac: C99 fixes for poll_works check
Include <fcntl.h> if it is available for the open prototype.
Return from main instead of calling exit, so that no function
declaration is needed.
---
erts/configure | 4 ++--
erts/configure.ac | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/erts/configure b/erts/configure
index 136b7eb..eb621ff 100755
--- a/erts/configure
+++ b/erts/configure
@@ -24908,9 +24908,9 @@ int main()
fds[0].events = POLLIN;
fds[0].revents = 0;
if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) {
- exit(1); /* Does not work for devices -- fail */
+ return 1; /* Does not work for devices -- fail */
}
- exit(0);
+ return 0;
#endif
}
diff --git a/erts/configure.ac b/erts/configure.ac
index a0769f0..5869b3c 100644
--- a/erts/configure.ac
+++ b/erts/configure.ac
@@ -3117,9 +3117,9 @@ int main()
fds[0].events = POLLIN;
fds[0].revents = 0;
if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) {
- exit(1); /* Does not work for devices -- fail */
+ return 1; /* Does not work for devices -- fail */
}
- exit(0);
+ return 0;
#endif
}
]])],[poll_works=yes],[poll_works=no],[
--
2.43.5
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/erlang.git
git@gitee.com:src-openeuler/erlang.git
src-openeuler
erlang
erlang
master

搜索帮助