diff options
author | Hannes Magnusson <bjori@php.net> | 2006-11-16 16:06:51 +0000 |
---|---|---|
committer | Hannes Magnusson <bjori@php.net> | 2006-11-16 16:06:51 +0000 |
commit | 133bdb42e379265c3026d70636c4871ac3af989e (patch) | |
tree | a1ddd897fa1bddd8d7dead1369b2dfff8d8fc45f | |
parent | cf0458755361d8f5ea36552638f89ca4cf865094 (diff) | |
download | php-git-133bdb42e379265c3026d70636c4871ac3af989e.tar.gz |
Fix ftruncate() with negative size on FreeBSD
-rw-r--r-- | main/streams/plain_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 9506428513..f268eaf07c 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -761,7 +761,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void return fd == -1 ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK; case PHP_STREAM_TRUNCATE_SET_SIZE: - return ftruncate(fd, *(size_t*)ptrparam) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; + return ftruncate(fd, *(ptrdiff_t*)ptrparam) == 0 ? PHP_STREAM_OPTION_RETURN_OK : PHP_STREAM_OPTION_RETURN_ERR; } default: |