Skip to content

Commit

Permalink
Make poll() test work with gcc 14
Browse files Browse the repository at this point in the history
Fixes #9211

* Add headers (`stdlib.h`, `fcntl.h`) for `poll`
* Add `unistd.h` for `sbrk`
  • Loading branch information
lukebakken authored and jhogberg committed Dec 23, 2024
1 parent 412bff5 commit 189d312
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion erts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -20934,6 +20934,7 @@ else $as_nop
/* end confdefs.h. */

#include <stdlib.h>
#include <unistd.h>
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
Expand Down Expand Up @@ -24889,8 +24890,10 @@ else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

#include <fcntl.h>
#include <poll.h>
main()
#include <stdlib.h>
int main()
{
#ifdef _POLL_EMUL_H_
exit(1); /* Implemented using select() -- fail */
Expand Down
5 changes: 4 additions & 1 deletion erts/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2456,6 +2456,7 @@ AC_CACHE_CHECK([if __after_morecore_hook can track malloc()s core memory use],
erts_cv___after_morecore_hook_can_track_malloc,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdlib.h>
#include <unistd.h>
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
Expand Down Expand Up @@ -3098,8 +3099,10 @@ poll_works=no
[
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <fcntl.h>
#include <poll.h>
main()
#include <stdlib.h>
int main()
{
#ifdef _POLL_EMUL_H_
exit(1); /* Implemented using select() -- fail */
Expand Down

0 comments on commit 189d312

Please sign in to comment.