com php-src: Fixed bug #70214 (FASYNC possibly not defined): sapi/phpdbg/phpdbg_utils.c
| From: | Anatol Belski | Date: | Sat, 08 Aug 2015 13:53:27 +0000 |
| Subject: | com php-src: Fixed bug #70214 (FASYNC possibly not defined): sapi/phpdbg/phpdbg_utils.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88647@lists.php.net to get a copy of this message | ||
Commit: 0c60524190b15fbc583db44b8cb4e3fddac9549c
Author: Bob Weinand <bobwei9@hotmail.com> Sat, 8 Aug 2015 15:53:27 +0200
Parents: b7aac1f5f2d1f072fa52b0bbedce1ac7d20ae789
Branches: PHP-7.0.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0c60524190b15fbc583db44b8cb4e3fddac9549c
Log:
Fixed bug #70214 (FASYNC possibly not defined)
Bugs:
https://bugs.php.net/70214
Changed paths:
M sapi/phpdbg/phpdbg_utils.c
Diff:
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c
index d0a2498..e9b30c0 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 <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);