Skip to content

Commit b0d1394

Browse files
committed
Use standard types in fopencookie test
Instead of internal __size_t / __off64_t types use ssize_t and off64_t. This makes it work on musl as well.
1 parent ed13fee commit b0d1394

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build/php.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,16 +1445,16 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
14451445
#include <stdlib.h>
14461446
14471447
struct cookiedata {
1448-
__off64_t pos;
1448+
off64_t pos;
14491449
};
14501450
1451-
__ssize_t reader(void *cookie, char *buffer, size_t size)
1451+
ssize_t reader(void *cookie, char *buffer, size_t size)
14521452
{ return size; }
1453-
__ssize_t writer(void *cookie, const char *buffer, size_t size)
1453+
ssize_t writer(void *cookie, const char *buffer, size_t size)
14541454
{ return size; }
14551455
int closer(void *cookie)
14561456
{ return 0; }
1457-
int seeker(void *cookie, __off64_t *position, int whence)
1457+
int seeker(void *cookie, off64_t *position, int whence)
14581458
{ ((struct cookiedata*)cookie)->pos = *position; return 0; }
14591459
14601460
cookie_io_functions_t funcs = {reader, writer, seeker, closer};

main/streams/cast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static ssize_t stream_cookie_writer(void *cookie, const char *buffer, size_t siz
101101
}
102102

103103
# ifdef COOKIE_SEEKER_USES_OFF64_T
104-
static int stream_cookie_seeker(void *cookie, __off64_t *position, int whence)
104+
static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
105105
{
106106

107107
*position = php_stream_seek((php_stream *)cookie, (zend_off_t)*position, whence);

0 commit comments

Comments
 (0)