diff options
Diffstat (limited to 'ext/standard/flock_compat.h')
| -rw-r--r-- | ext/standard/flock_compat.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index 4b67b5cb04..457e469eaa 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -21,12 +21,18 @@ #ifndef FLOCK_COMPAT_H #define FLOCK_COMPAT_H +/* php_flock internally uses fcntl whther or not flock is available + * This way our php_flock even works on NFS files. + * More info: /usr/src/linux/Documentation + */ +PHPAPI int php_flock(int fd, int operation); + #ifndef HAVE_FLOCK # define LOCK_SH 1 # define LOCK_EX 2 # define LOCK_NB 4 # define LOCK_UN 8 -PHPAPI int flock(int fd, int operation); +# define flock php_flock #endif #ifdef PHP_WIN32 |
