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>
(cherry picked from commit e6ab7f9f34
)
This commit is contained in:
parent
0e60139064
commit
88f12aa74b
|
@ -159,7 +159,7 @@ dnl Checks for library functions.
|
||||||
AC_CHECK_FUNCS([backtrace geteuid getuid issetugid getresuid \
|
AC_CHECK_FUNCS([backtrace geteuid getuid issetugid getresuid \
|
||||||
getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
|
getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
|
||||||
mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
|
mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
|
||||||
walkcontext setitimer poll epoll_create1 mkostemp memfd_create])
|
walkcontext setitimer poll epoll_create1 mkostemp memfd_create isastream])
|
||||||
AC_CONFIG_LIBOBJ_DIR([os])
|
AC_CONFIG_LIBOBJ_DIR([os])
|
||||||
AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\
|
AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\
|
||||||
timingsafe_memcmp])
|
timingsafe_memcmp])
|
||||||
|
|
|
@ -208,7 +208,8 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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 (!installed && isastream(fd)) {
|
||||||
if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) {
|
if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) {
|
||||||
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n",
|
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n",
|
||||||
|
@ -279,7 +280,7 @@ xf86RemoveSIGIOHandler(int fd)
|
||||||
#ifdef O_ASYNC
|
#ifdef O_ASYNC
|
||||||
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC);
|
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC);
|
||||||
#endif
|
#endif
|
||||||
#ifdef I_SETSIG
|
#if defined(I_SETSIG) && defined(HAVE_ISASTREAM)
|
||||||
if (isastream(fd)) {
|
if (isastream(fd)) {
|
||||||
if (ioctl(fd, I_SETSIG, 0) == -1) {
|
if (ioctl(fd, I_SETSIG, 0) == -1) {
|
||||||
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n",
|
xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n",
|
||||||
|
|
|
@ -515,4 +515,7 @@
|
||||||
/* Have epoll_create1() */
|
/* Have epoll_create1() */
|
||||||
#undef HAVE_EPOLL_CREATE1
|
#undef HAVE_EPOLL_CREATE1
|
||||||
|
|
||||||
|
/* Have isastream */
|
||||||
|
#undef HAVE_ISASTREAM
|
||||||
|
|
||||||
#endif /* _DIX_CONFIG_H_ */
|
#endif /* _DIX_CONFIG_H_ */
|
||||||
|
|
|
@ -114,6 +114,7 @@ conf_data.set('HAVE_CBRT', cc.has_function('cbrt'))
|
||||||
conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1'))
|
conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1'))
|
||||||
conf_data.set('HAVE_GETUID', cc.has_function('getuid'))
|
conf_data.set('HAVE_GETUID', cc.has_function('getuid'))
|
||||||
conf_data.set('HAVE_GETEUID', cc.has_function('geteuid'))
|
conf_data.set('HAVE_GETEUID', cc.has_function('geteuid'))
|
||||||
|
conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream'))
|
||||||
conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid'))
|
conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid'))
|
||||||
conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
|
conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
|
||||||
conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid'))
|
conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid'))
|
||||||
|
|
Loading…
Reference in New Issue