--- main/streams/cast.c.bak 2026-03-03 21:01:49.742036485 +0100 +++ main/streams/cast.c 2026-03-03 21:10:36.519494693 +0100 @@ -122,11 +122,16 @@ return 0; } # else -static int stream_cookie_seeker(void *cookie, off_t position, int whence) +static int stream_cookie_seeker(void *cookie, __off64_t *position, int whence) { TSRMLS_FETCH(); - return php_stream_seek((php_stream *)cookie, position, whence); + *position = php_stream_seek((php_stream *)cookie, (off_t)*position, whence); + + if (*position == -1) { + return -1; + } + return 0; } # endif