xserver: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 24 00:03:03 UTC 2019
hw/xfree86/meson.build | 2 ++
hw/xfree86/os-support/meson.build | 4 ++--
include/meson.build | 4 +++-
os/ospoll.c | 24 +++++++++++++++---------
4 files changed, 22 insertions(+), 12 deletions(-)
New commits:
commit 6036e845271800b2e268f5cba9283ce07a7fad3a
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Sep 23 16:28:42 2019 -0700
meson: fix builds on Solaris 11.4
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
index c80964ea4..8b657acf0 100644
--- a/hw/xfree86/meson.build
+++ b/hw/xfree86/meson.build
@@ -75,6 +75,8 @@ endif
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
linker_export_flags = '-Wl,--export-all-symbols'
+elif host_machine.system() == 'sunos'
+ linker_export_flags = []
else
linker_export_flags = '-Wl,--export-dynamic'
endif
diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build
index 484a118e7..6e426665a 100644
--- a/hw/xfree86/os-support/meson.build
+++ b/hw/xfree86/os-support/meson.build
@@ -16,7 +16,7 @@ os_c_args = []
if get_option('pciaccess')
srcs_xorg_os_support += 'bus/Pci.c'
- if host_machine.system() != 'linux' and host_machine.system() != 'solaris'
+ if host_machine.system() != 'linux'
srcs_xorg_os_support += 'bus/bsd_pci.c'
endif
if host_machine.cpu() == 'sparc'
@@ -60,7 +60,7 @@ if host_machine.system() == 'linux'
srcs_xorg_os_support += 'shared/pm_noop.c'
endif
-elif host_machine.system() == 'solaris'
+elif host_machine.system() == 'sunos'
srcs_xorg_os_support += [
'solaris/sun_apm.c',
'solaris/sun_bell.c',
diff --git a/include/meson.build b/include/meson.build
index bb89493e1..661624a01 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -124,7 +124,6 @@ conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h'))
conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
conf_data.set('HAVE_STRING_H', cc.has_header('string.h'))
conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
-conf_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h'))
conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h'))
conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h'))
conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h'))
@@ -358,6 +357,9 @@ xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
xorg_data.set('XSERVER_PLATFORM_BUS', build_udev)
xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd')
+xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h'))
+xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h'))
+xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h'))
if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Mon Sep 23 15:12:01 2019 -0700
ospoll: Fix Solaris ports implementation to build on Solaris 11.4
Wrong version got committed, but wasn't noticed since it only builds
with meson, not autoconf.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
diff --git a/os/ospoll.c b/os/ospoll.c
index db9e73811..c68aabc87 100644
--- a/os/ospoll.c
+++ b/os/ospoll.c
@@ -40,6 +40,7 @@
#if !HAVE_OSPOLL && defined(HAVE_PORT_CREATE)
#include <port.h>
+#include <poll.h>
#define PORT 1
#define HAVE_OSPOLL 1
#endif
@@ -78,7 +79,6 @@ struct ospoll {
#endif
#if EPOLL || PORT
-#include <sys/epoll.h>
/* epoll-based implementation */
struct ospollfd {
@@ -468,10 +468,10 @@ epoll_mod(struct ospoll *ospoll, struct ospollfd *osfd)
{
int events = 0;
if (osfd->xevents & X_NOTIFY_READ)
- events |= EPOLLIN;
+ events |= POLLIN;
if (osfd->xevents & X_NOTIFY_WRITE)
- events |= EPOLLOUT;
- port_associate(ospool->epoll_fd, PORT_SOURCE_FD, osfd->fd, events, osfd);
+ events |= POLLOUT;
+ port_associate(ospoll->epoll_fd, PORT_SOURCE_FD, osfd->fd, events, osfd);
}
#endif
@@ -601,9 +601,14 @@ ospoll_wait(struct ospoll *ospoll, int timeout)
#define MAX_EVENTS 256
port_event_t events[MAX_EVENTS];
uint_t nget = 1;
+ timespec_t port_timeout = {
+ .tv_sec = timeout / 1000,
+ .tv_nsec = (timeout % 1000) * 1000000
+ };
nready = 0;
- if (port_getn(ospoll->epoll_fd, events, MAX_EVENTS, &nget, &timeout) == 0) {
+ if (port_getn(ospoll->epoll_fd, events, MAX_EVENTS, &nget, &port_timeout)
+ == 0) {
nready = nget;
}
for (int i = 0; i < nready; i++) {
@@ -612,17 +617,18 @@ ospoll_wait(struct ospoll *ospoll, int timeout)
uint32_t revents = ev->portev_events;
int xevents = 0;
- if (revents & EPOLLIN)
+ if (revents & POLLIN)
xevents |= X_NOTIFY_READ;
- if (revents & EPOLLOUT)
+ if (revents & POLLOUT)
xevents |= X_NOTIFY_WRITE;
- if (revents & (~(EPOLLIN|EPOLLOUT)))
+ if (revents & (~(POLLIN|POLLOUT)))
xevents |= X_NOTIFY_ERROR;
if (osfd->callback)
osfd->callback(osfd->fd, xevents, osfd->data);
- if (osfd->trigger == ospoll_trigger_level && !osfd->deleted) {
+ if (osfd->trigger == ospoll_trigger_level &&
+ !xorg_list_is_empty(&osfd->deleted)) {
epoll_mod(ospoll, osfd);
}
}
More information about the xorg-commit
mailing list