diff options
author | Matteo Beccati <mbeccati@php.net> | 2013-06-14 16:55:12 +0200 |
---|---|---|
committer | Matteo Beccati <mbeccati@php.net> | 2013-06-14 16:55:12 +0200 |
commit | 6f594514b07512360fb864b74facf928faed83a3 (patch) | |
tree | 99c366f24a9ee02fee80e16003069aef32ce1ee1 /main | |
parent | e74776266fae4c9866cc4eb06d0f87405bda8411 (diff) | |
parent | 02f552cecadf7fa0a77f179e02f4dcb33b267105 (diff) | |
download | php-git-6f594514b07512360fb864b74facf928faed83a3.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Fixed bug #63186 (compile failure on netbsd)
Diffstat (limited to 'main')
-rw-r--r-- | main/streams/cast.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/main/streams/cast.c b/main/streams/cast.c index 878b4b52e7..da6a293e45 100644 --- a/main/streams/cast.c +++ b/main/streams/cast.c @@ -31,10 +31,18 @@ /* Under BSD, emulate fopencookie using funopen */ #if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE) + +/* NetBSD 6.0+ uses off_t instead of fpos_t in funopen */ +# if defined(__NetBSD__) && (__NetBSD_Version__ > 600000000) +# define PHP_FPOS_T off_t +# else +# define PHP_FPOS_T fpos_t +# endif + typedef struct { int (*reader)(void *, char *, int); int (*writer)(void *, const char *, int); - fpos_t (*seeker)(void *, fpos_t, int); + PHP_FPOS_T (*seeker)(void *, PHP_FPOS_T, int); int (*closer)(void *); } COOKIE_IO_FUNCTIONS_T; @@ -68,11 +76,11 @@ static int stream_cookie_writer(void *cookie, const char *buffer, int size) return php_stream_write((php_stream *)cookie, (char *)buffer, size); } -static fpos_t stream_cookie_seeker(void *cookie, off_t position, int whence) +static PHP_FPOS_T stream_cookie_seeker(void *cookie, off_t position, int whence) { TSRMLS_FETCH(); - return (fpos_t)php_stream_seek((php_stream *)cookie, position, whence); + return (PHP_FPOS_T)php_stream_seek((php_stream *)cookie, position, whence); } static int stream_cookie_closer(void *cookie) |