desktop/unx/source/start.c | 2 +- vcl/headless/svpinst.cxx | 2 +- vcl/unx/generic/dtrans/X11_selection.cxx | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-)
New commits: commit 4242c7b91887236375e08e2b6b24de0cecbf1626 Author: Ismael Luceno <ism...@iodev.co.uk> AuthorDate: Tue Dec 28 23:24:08 2021 +0100 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Wed Dec 29 13:05:46 2021 +0100 Always use <poll.h>, no modern system needs <sys/poll.h> This was standardized in IEEE 1003.1-2001, so more than 20 years old. Verified following systems using online resources: - FreeBSD 3.0 (1998) - NetBSD 1.3 (1998) - OpenBSD 2.0 (1996) - CentOS 5.0 (2007) - Debian 4.0 (2007) - IRIX 6.5.30 (2006) - SunOS 4.1.3 (1992) - SUSE 10.2 (2008) - Red Hat 5.0 (1998) So the check used for BSDs on vcl/unx/generic/dtrans/X11_selection.cxx was never correct. On GNU/Linux specifically, <poll.h> is provided since glibc 2.0 (1997). musl libc produces the following warning if the non-standard header is included: /usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] Change-Id: Ia8f4b9e1ee069f86abe03140c18a77d17336d09c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127666 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c index 385761a81230..a83db69e5c66 100644 --- a/desktop/unx/source/start.c +++ b/desktop/unx/source/start.c @@ -18,7 +18,7 @@ #include <sys/socket.h> #include <arpa/inet.h> #include <sys/un.h> -#include <sys/poll.h> +#include <poll.h> #include <fcntl.h> #include <stdio.h> #include <libgen.h> diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index a42b788a8249..181e01782214 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -27,7 +27,7 @@ #include <fcntl.h> #include <pthread.h> #include <sys/time.h> -#include <sys/poll.h> +#include <poll.h> #include <sal/types.h> #include <sal/log.hxx> diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 8d3298aead3a..1c6ec92f1b87 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -34,11 +34,7 @@ #include <X11/Xatom.h> #include <X11/keysym.h> -#if defined(NETBSD) || defined (FREEBSD) || defined(OPENBSD) -#include <sys/poll.h> -#else #include <poll.h> -#endif #include <sal/macros.h>