Skip to content

Commit 4cc4f9c

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 ef773bf commit 4cc4f9c

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
@@ -1464,16 +1464,16 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
14641464
#include <stdio.h>
14651465
14661466
struct cookiedata {
1467-
__off64_t pos;
1467+
off64_t pos;
14681468
};
14691469
1470-
__ssize_t reader(void *cookie, char *buffer, size_t size)
1470+
ssize_t reader(void *cookie, char *buffer, size_t size)
14711471
{ return size; }
1472-
__ssize_t writer(void *cookie, const char *buffer, size_t size)
1472+
ssize_t writer(void *cookie, const char *buffer, size_t size)
14731473
{ return size; }
14741474
int closer(void *cookie)
14751475
{ return 0; }
1476-
int seeker(void *cookie, __off64_t *position, int whence)
1476+
int seeker(void *cookie, off64_t *position, int whence)
14771477
{ ((struct cookiedata*)cookie)->pos = *position; return 0; }
14781478
14791479
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
@@ -103,7 +103,7 @@ static ssize_t stream_cookie_writer(void *cookie, const char *buffer, size_t siz
103103
}
104104

105105
# ifdef COOKIE_SEEKER_USES_OFF64_T
106-
static int stream_cookie_seeker(void *cookie, __off64_t *position, int whence)
106+
static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
107107
{
108108

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

0 commit comments

Comments
 (0)