Skip to content

Build fails on musl 1.2.4 - lfs64 #11678

Closed
@andypost

Description

@andypost

Description

After removal of patches alpinelinux/aports@cab9b78 Alpinelinux now fails to compile with following output:

/builds/alpine/aports/testing/php83/src/php-8.3.0alpha3/main/streams/cast.c:139:2: error: incompatible function pointer types initializing 'cookie_seek_function_t *' (aka 'int (*)(void *, long *, int)') with an expression of type 'int (void *, zend_off_t, int)' (aka 'int (void *, long, int)') [-Wincompatible-function-pointer-types]
        stream_cookie_seeker, stream_cookie_closer
        ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile:2600: main/streams/cast.lo] Error 1

Discussion https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/48728#note_321723

Build fixed by removing check

php-src/main/streams/cast.c

Lines 105 to 122 in 62a9408

# ifdef COOKIE_SEEKER_USES_OFF64_T
static int stream_cookie_seeker(void *cookie, off64_t *position, int whence)
{
*position = php_stream_seek((php_stream *)cookie, (zend_off_t)*position, whence);
if (*position == -1) {
return -1;
}
return 0;
}
# else
static int stream_cookie_seeker(void *cookie, zend_off_t position, int whence)
{
return php_stream_seek((php_stream *)cookie, position, whence);
}
# endif

PHP Version

PHP 8.1.21

Operating System

Alpinelinux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions