From 94e48a9faa8baccdfd743ec93205730a9f3c2bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Helmesj=C3=B6?= Date: Tue, 20 Sep 2022 15:16:03 +0200 Subject: [PATCH] Add HAVE_POLL_H (GH PR #56) Same check as for HAVE_POLL. --- .../libbuild2/autoconf/checks/HAVE_POLL_H.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL_H.h diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL_H.h b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL_H.h new file mode 100644 index 0000000..ebd4215 --- /dev/null +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/HAVE_POLL_H.h @@ -0,0 +1,19 @@ +// HAVE_POLL_H : BUILD2_AUTOCONF_LIBC_VERSION + +#ifndef BUILD2_AUTOCONF_LIBC_VERSION +# error BUILD2_AUTOCONF_LIBC_VERSION appears to be conditionally included +#endif + +#undef HAVE_POLL_H + +/* Since Linux 2.1.23/glibc (all versions; emulated using select() on older + * kernels), FreeBSD (all versions), OpenBSD (all versions), NetBSD 1.3, Mac + * OS (all versions). + */ +#if defined(__GLIBC__) || \ + defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + BUILD2_AUTOCONF_NETBSD_PREREQ(1, 3) || \ + defined(BUILD2_AUTOCONF_MACOS) +# define HAVE_POLL_H 1 +#endif