From: Bob Weinand Date: Sat, 8 Aug 2015 13:53:27 +0000 (+0200) Subject: Fixed bug #70214 (FASYNC possibly not defined) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c60524190b15fbc583db44b8cb4e3fddac9549c;p=php Fixed bug #70214 (FASYNC possibly not defined) --- diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index d0a24986a9..e9b30c07b1 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -26,11 +26,16 @@ #include "phpdbg_utils.h" #include "ext/standard/php_string.h" -#if defined(HAVE_SYS_IOCTL_H) -# include "sys/ioctl.h" -# ifndef GWINSZ_IN_SYS_IOCTL -# include -# endif +/* FASYNC under Solaris */ +#ifdef HAVE_SYS_FILE_H +# include +#endif + +#ifdef HAVE_SYS_IOCTL_H +# include "sys/ioctl.h" +# ifndef GWINSZ_IN_SYS_IOCTL +# include +# endif #endif ZEND_EXTERN_MODULE_GLOBALS(phpdbg); @@ -347,7 +352,7 @@ PHPDBG_API int phpdbg_get_terminal_width(void) /* {{{ */ } /* }}} */ PHPDBG_API void phpdbg_set_async_io(int fd) { -#ifndef _WIN32 +#if !defined(_WIN32) && defined(FASYNC) int flags; fcntl(STDIN_FILENO, F_SETOWN, getpid()); flags = fcntl(STDIN_FILENO, F_GETFL);