Skip to content

Commit e2604aa

Browse files
committed
Make poll() test work with gcc 14
Fixes #9211 * Add headers (`stdlib.h`, `fcntl.h`) for `poll` * Add `unistd.h` for `sbrk`
1 parent 3ab59bb commit e2604aa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

erts/configure

+4-1
Original file line numberDiff line numberDiff line change
@@ -21733,6 +21733,7 @@ else case e in #(
2173321733
/* end confdefs.h. */
2173421734

2173521735
#include <stdlib.h>
21736+
#include <unistd.h>
2173621737
#ifdef HAVE_MALLOC_H
2173721738
# include <malloc.h>
2173821739
#endif
@@ -25922,8 +25923,10 @@ else case e in #(
2592225923
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592325924
/* end confdefs.h. */
2592425925

25926+
#include <fcntl.h>
2592525927
#include <poll.h>
25926-
main()
25928+
#include <stdlib.h>
25929+
int main()
2592725930
{
2592825931
#ifdef _POLL_EMUL_H_
2592925932
exit(1); /* Implemented using select() -- fail */

erts/configure.ac

+4-1
Original file line numberDiff line numberDiff line change
@@ -2443,6 +2443,7 @@ AC_CACHE_CHECK([if __after_morecore_hook can track malloc()s core memory use],
24432443
erts_cv___after_morecore_hook_can_track_malloc,
24442444
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
24452445
#include <stdlib.h>
2446+
#include <unistd.h>
24462447
#ifdef HAVE_MALLOC_H
24472448
# include <malloc.h>
24482449
#endif
@@ -3137,8 +3138,10 @@ poll_works=no
31373138
[
31383139
31393140
AC_RUN_IFELSE([AC_LANG_SOURCE([[
3141+
#include <fcntl.h>
31403142
#include <poll.h>
3141-
main()
3143+
#include <stdlib.h>
3144+
int main()
31423145
{
31433146
#ifdef _POLL_EMUL_H_
31443147
exit(1); /* Implemented using select() -- fail */

0 commit comments

Comments
 (0)