Date: Thu, 18 Jun 2026 14:08:56 +0000 From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 7093eb73b0bb - main - lang/swipl: fix build on !amd64 Message-ID: <6a33fbf8.3a93f.48cfa0ec@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=7093eb73b0bb26b966ef35df849670c638ab3ff2 commit 7093eb73b0bb26b966ef35df849670c638ab3ff2 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2026-06-16 18:35:52 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2026-06-18 14:08:50 +0000 lang/swipl: fix build on !amd64 Including poll.h is guarded behind HAVE_POLL_H, but then it also starts using poll() and struct pollfd, which fails: /wrkdirs/usr/ports/lang/swipl/work/swipl-9.2.9/src/os/pl-file.c:2604:25: error: array has incomplete element type 'struct pollfd' 2604 | struct pollfd poll_buf[FASTMAP_SIZE]; | ^ /wrkdirs/usr/ports/lang/swipl/work/swipl-9.2.9/src/os/pl-file.c:2604:10: note: forward declaration of 'struct pollfd' 2604 | struct pollfd poll_buf[FASTMAP_SIZE]; | ^ /wrkdirs/usr/ports/lang/swipl/work/swipl-9.2.9/src/os/pl-file.c:2642:45: error: invalid application of 'sizeof' to an incomplete type 'struct pollfd' 2642 | else if ( !(poll_map = malloc(count*sizeof(*poll_map))) ) | ^~~~~~~~~~~ /wrkdirs/usr/ports/lang/swipl/work/swipl-9.2.9/src/os/pl-file.c:2604:10: note: forward declaration of 'struct pollfd' 2604 | struct pollfd poll_buf[FASTMAP_SIZE]; | ^ /wrkdirs/usr/ports/lang/swipl/work/swipl-9.2.9/src/os/pl-file.c:2644:35: error: invalid application of 'sizeof' to an incomplete type 'struct pollfd' 2644 | memset(poll_map, 0, count*sizeof(*poll_map)); | ^~~~~~~~~~~ --- lang/swipl/files/patch-src_os_pl-file.c | 11 +++++++++++ lang/swipl/files/patch-src_os_pl-stream.c | 11 +++++++++++ lang/swipl/files/patch-src_pl-fli.c | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/lang/swipl/files/patch-src_os_pl-file.c b/lang/swipl/files/patch-src_os_pl-file.c new file mode 100644 index 000000000000..559536a36280 --- /dev/null +++ b/lang/swipl/files/patch-src_os_pl-file.c @@ -0,0 +1,11 @@ +--- src/os/pl-file.c.orig 2026-06-16 17:23:46 UTC ++++ src/os/pl-file.c +@@ -67,7 +67,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + #include "../pl-trace.h" + #include <errno.h> + +-#if defined(HAVE_POLL_H) && defined(HAVE_POLL) ++#if defined(HAVE_POLL) + #include <poll.h> + #elif defined(HAVE_SYS_SELECT_H) + #include <sys/select.h> diff --git a/lang/swipl/files/patch-src_os_pl-stream.c b/lang/swipl/files/patch-src_os_pl-stream.c new file mode 100644 index 000000000000..2be662c4f489 --- /dev/null +++ b/lang/swipl/files/patch-src_os_pl-stream.c @@ -0,0 +1,11 @@ +--- src/os/pl-stream.c.orig 2026-06-16 17:23:46 UTC ++++ src/os/pl-stream.c +@@ -98,7 +98,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + #include <stdarg.h> + #include <ctype.h> + #include <sys/stat.h> +-#if defined(HAVE_POLL_H) ++#if defined(HAVE_POLL) + #include <poll.h> + #elif defined(HAVE_SYS_SELECT_H) + #include <sys/select.h> diff --git a/lang/swipl/files/patch-src_pl-fli.c b/lang/swipl/files/patch-src_pl-fli.c new file mode 100644 index 000000000000..ec8a7686f015 --- /dev/null +++ b/lang/swipl/files/patch-src_pl-fli.c @@ -0,0 +1,11 @@ +--- src/pl-fli.c.orig 2026-06-16 17:23:46 UTC ++++ src/pl-fli.c +@@ -5066,7 +5066,7 @@ PL_dispatch_hook(PL_dispatch_hook_t hook) + + + #if defined(HAVE_SELECT) && !defined(__WINDOWS__) +-#if defined(HAVE_POLL_H) && defined(HAVE_POLL) ++#if defined(HAVE_POLL) + #include <poll.h> + #elif defined(HAVE_SYS_SELECT_H) + #include <sys/select.h>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a33fbf8.3a93f.48cfa0ec>
