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 committed Dec 22, 2024
1 parent 3ab59bb commit e2604aa
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 @@ -21733,6 +21733,7 @@ else case e in #(
/* end confdefs.h. */

#include <stdlib.h>
#include <unistd.h>
#ifdef HAVE_MALLOC_H
# include <malloc.h>
#endif
Expand Down Expand Up @@ -25922,8 +25923,10 @@ else case e in #(
e) 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 @@ -2443,6 +2443,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 @@ -3137,8 +3138,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 e2604aa

Please sign in to comment.