代码拉取完成,页面将自动刷新
同步操作将从 OpenCloudOS Stream/erlang 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From: Florian Weimer <[email protected]>
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.
diff --git a/erts/configure b/erts/configure
index 16fd52dad4..a991217017 100755
--- a/erts/configure
+++ b/erts/configure
@@ -24555,10 +24555,13 @@ else $as_nop
/* end confdefs.h. */
#include <poll.h>
-main()
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+int main()
{
#ifdef _POLL_EMUL_H_
- exit(1); /* Implemented using select() -- fail */
+ return 1; /* Implemented using select() -- fail */
#else
struct pollfd fds[1];
int fd;
@@ -24567,9 +24570,9 @@ 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 71423a4c4d..f658b66e3c 100644
--- a/erts/configure.ac
+++ b/erts/configure.ac
@@ -3036,10 +3036,13 @@ poll_works=no
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <poll.h>
-main()
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+int main()
{
#ifdef _POLL_EMUL_H_
- exit(1); /* Implemented using select() -- fail */
+ return 1; /* Implemented using select() -- fail */
#else
struct pollfd fds[1];
int fd;
@@ -3048,9 +3051,9 @@ 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],[
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。