mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 01:06:09 +08:00
Fix static linux cli -a not working issue (#893)
This commit is contained in:
26
src/globals/patch/musl_static_readline.patch
Normal file
26
src/globals/patch/musl_static_readline.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c
|
||||
index 31212999..d80a21c3 100644
|
||||
--- a/ext/readline/readline_cli.c
|
||||
+++ b/ext/readline/readline_cli.c
|
||||
@@ -739,8 +739,8 @@ typedef cli_shell_callbacks_t *(__cdecl *get_cli_shell_callbacks)(void);
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
-/*
|
||||
#ifdef COMPILE_DL_READLINE
|
||||
+/*
|
||||
This dlsym() is always used as even the CGI SAPI is linked against "CLI"-only
|
||||
extensions. If that is being changed dlsym() should only be used when building
|
||||
this extension sharedto offer compatibility.
|
||||
@@ -754,9 +754,9 @@ this extension sharedto offer compatibility.
|
||||
(cb) = get_callbacks(); \
|
||||
} \
|
||||
} while(0)
|
||||
-/*#else
|
||||
+#else
|
||||
#define GET_SHELL_CB(cb) (cb) = php_cli_get_shell_callbacks()
|
||||
-#endif*/
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
PHP_MINIT_FUNCTION(cli_readline)
|
||||
@@ -50,7 +50,7 @@ $prefer_pre_built = false;
|
||||
|
||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||
$extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'bcmath',
|
||||
'Linux', 'Darwin' => 'readline',
|
||||
'Windows' => 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pdo,pdo_mysql,pdo_sqlite,phar,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user