File tree Expand file tree Collapse file tree 3 files changed +34
-1
lines changed
Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ protected function build(): void
3838 ->make ();
3939 $ final = FileSystem::scanDirFiles (BUILD_BIN_PATH , relative: true );
4040 // Remove the new files
41- $ new_files = array_diff ($ final , $ filelist );
41+ $ new_files = array_diff ($ final , $ filelist ?: [] );
4242 foreach ($ new_files as $ file ) {
4343 @unlink (BUILD_BIN_PATH . '/ ' . $ file );
4444 }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public static function init(): void
2323 FileSystem::addSourceExtractHook ('php-src ' , [__CLASS__ , 'patchPhpLibxml212 ' ]);
2424 FileSystem::addSourceExtractHook ('php-src ' , [__CLASS__ , 'patchGDWin32 ' ]);
2525 FileSystem::addSourceExtractHook ('php-src ' , [__CLASS__ , 'patchFfiCentos7FixO3strncmp ' ]);
26+ FileSystem::addSourceExtractHook ('php-src ' , [__CLASS__ , 'patchStaticReadline ' ]);
2627 FileSystem::addSourceExtractHook ('sqlsrv ' , [__CLASS__ , 'patchSQLSRVWin32 ' ]);
2728 FileSystem::addSourceExtractHook ('pdo_sqlsrv ' , [__CLASS__ , 'patchSQLSRVWin32 ' ]);
2829 FileSystem::addSourceExtractHook ('yaml ' , [__CLASS__ , 'patchYamlWin32 ' ]);
@@ -500,6 +501,12 @@ public static function patchFfiCentos7FixO3strncmp(): bool
500501 return true ;
501502 }
502503
504+ public static function patchStaticReadline (): bool
505+ {
506+ self ::patchFile ('musl_static_readline.patch ' , SOURCE_PATH . '/php-src ' );
507+ return true ;
508+ }
509+
503510 public static function patchPkgConfigForGcc15 (): bool
504511 {
505512 self ::patchFile ('pkg-config_gcc15.patch ' , SOURCE_PATH . '/pkg-config ' );
Original file line number Diff line number Diff line change 1+ diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c
2+ index 31212999..d80a21c3 100644
3+ --- a/ext/readline/readline_cli.c
4+ +++ b/ext/readline/readline_cli.c
5+ @@ -739,8 +739,8 @@ typedef cli_shell_callbacks_t *(__cdecl *get_cli_shell_callbacks)(void);
6+ } while(0)
7+
8+ #else
9+ - /*
10+ #ifdef COMPILE_DL_READLINE
11+ + /*
12+ This dlsym() is always used as even the CGI SAPI is linked against "CLI"-only
13+ extensions. If that is being changed dlsym() should only be used when building
14+ this extension sharedto offer compatibility.
15+ @@ -754,9 +754,9 @@ this extension sharedto offer compatibility.
16+ (cb) = get_callbacks(); \
17+ } \
18+ } while(0)
19+ - /*#else
20+ + #else
21+ #define GET_SHELL_CB(cb) (cb) = php_cli_get_shell_callbacks()
22+ - #endif*/
23+ + #endif
24+ #endif
25+
26+ PHP_MINIT_FUNCTION(cli_readline)
You can’t perform that action at this time.
0 commit comments