]> granicus.if.org Git - php/commitdiff
Fixed bug #70214 (FASYNC possibly not defined)
authorBob Weinand <bobwei9@hotmail.com>
Sat, 8 Aug 2015 13:53:27 +0000 (15:53 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Sat, 8 Aug 2015 13:53:27 +0000 (15:53 +0200)
sapi/phpdbg/phpdbg_utils.c

index d0a24986a9ec25dee604e2cc444163bcfe381303..e9b30c07b17eac7c0b706ff6f40f5c08c53d9d82 100644 (file)
 #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 <termios.h>
-#      endif
+/* FASYNC under Solaris */
+#ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+# include "sys/ioctl.h"
+# ifndef GWINSZ_IN_SYS_IOCTL
+#  include <termios.h>
+# 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);