summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2019-11-21 11:23:18 -0500
committerMatt Turner <mattst88@gmail.com>2019-11-22 15:22:43 -0500
commite6ab7f9f342f463092c45226f3294074351fdd5e (patch)
tree7a9f01cb201ed669056391d7af0aba1d3b399605 /hw/xfree86
parentebf549db2d9341d99e0d0847b948dd798d98f7dc (diff)
xfree86: Test presence of isastream()
isastream() was never more than a stub in glibc, and was removed in glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented XSI STREAMS declarations"). Bug: https://bugs.gentoo.org/700838 Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/os-support/shared/sigio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index 884a71c61..247bec708 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -208,7 +208,8 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
}
}
#endif
-#ifdef I_SETSIG /* System V Streams - used on Solaris for input devices */
+#if defined(I_SETSIG) && defined(HAVE_ISASTREAM)
+ /* System V Streams - used on Solaris for input devices */
if (!installed && isastream(fd)) {
if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) {
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n",
@@ -279,7 +280,7 @@ xf86RemoveSIGIOHandler(int fd)
#ifdef O_ASYNC
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC);
#endif
-#ifdef I_SETSIG
+#if defined(I_SETSIG) && defined(HAVE_ISASTREAM)
if (isastream(fd)) {
if (ioctl(fd, I_SETSIG, 0) == -1) {
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n",