]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorDmitry Stogov <dmitry@zend.com>
Tue, 10 May 2016 14:53:33 +0000 (17:53 +0300)
committerDmitry Stogov <dmitry@zend.com>
Tue, 10 May 2016 14:53:33 +0000 (17:53 +0300)
* PHP-5.6:
  The "flock" structure has to be writable on AIX.

1  2 
ext/opcache/ZendAccelerator.c

index 8eddb4b76eebc55a57295f7f266a70565cbde423,418b4a3add18fd2125ebdff9d08f47959feeedc8..fab8975b9897fd1982aa4c7211df806b35bbf2e3
@@@ -305,12 -576,16 +321,16 @@@ static inline void accel_deactivate_sub
  #endif
  }
  
 -static inline void accel_unlock_all(TSRMLS_D)
 +static inline void accel_unlock_all(void)
  {
  #ifdef ZEND_WIN32
 -      accel_deactivate_sub(TSRMLS_C);
 +      accel_deactivate_sub();
  #else
+ # ifdef _AIX
+       static FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
+ # else
        static const FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
+ # endif
  
        if (fcntl(lock_file, F_SETLK, &mem_usage_unlock_all) == -1) {
                zend_accel_error(ACCEL_LOG_DEBUG, "UnlockAll:  %s (%d)", strerror(errno), errno);