summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmael Luceno <ismael@iodev.co.uk>2021-12-28 23:24:08 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2021-12-29 13:05:46 +0100
commit4242c7b91887236375e08e2b6b24de0cecbf1626 (patch)
tree9e915d1fdcf80cf33bb6c8fca02993d442da331a
parent923665ac525e8dad218724327fdbd98d4fb790ad (diff)
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 <glogow@fbihome.de>
-rw-r--r--desktop/unx/source/start.c2
-rw-r--r--vcl/headless/svpinst.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx4
3 files changed, 2 insertions, 6 deletions
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>