Bug #70214 [NEW]: Compilation fails, FASYNC not defined, needs sys/file.h include
From: rainer dot jung at kippdata dot de
Operating system: Solaris 10 Sparc
PHP version: 7.0.0beta3
Package: phpdbg
Bug Type: Bug
Bug description:Compilation fails, FASYNC not defined, needs sys/file.h include
Description:
------------
Compilation of phpdbg on Solaris 10 Sparc fails:
.../sapi/phpdbg/phpdbg_utils.c: In function 'phpdbg_set_async_io':
.../sapi/phpdbg/phpdbg_utils.c:353:39: error: 'FASYNC' undeclared (first
use in this function)
fcntl(STDIN_FILENO, F_SETFL, flags | FASYNC);
On Solaris FASYNC is defined in sys/file.h:
...
/* open-only modes */
#define FCREAT 0x0100
#define FTRUNC 0x0200
#define FEXCL 0x0400
#define FNOCTTY 0x0800
#define FXATTR 0x4000 /* open as extended attribute */
#define FASYNC 0x1000 /* asyncio in progress pseudo flag */
#define FNODSYNC 0x10000 /* fsync pseudo flag */
#define FNOFOLLOW 0x20000 /* don't follow symlinks */
#define FNOLINKS 0x40000 /* don't allow multiple hard links */
...
As a workaround I added "#include <sys/file.h>" to phpdbg.h.
I think you need to use auto foo to detect existence of FASYNC and if
not present check again with using sys/file.h to decide, whether you
need to include it. This is unfortunately outside of POSIX et. al., so
platform specific.
--
Edit bug report at https://bugs.php.net/bug.php?id=70214&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70214&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70214&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70214&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70214&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70214&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70214&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70214&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70214&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70214&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70214&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70214&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70214&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70214&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70214&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70214&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70214&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70214&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70214&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70214&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70214&r=mysqlcfg
Thread (2 messages)
- rainer dot jung at kippdata dot de