0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-08-12 06:53:05 +00:00
Files
termux-packages/packages/stdoutisatty/soname.patch
anon 5beb35ed85 add(main): stdoutisatty
what: https://wiki.archlinux.org/title/Color_output_in_console#Reading_from_stdin

why: unlike unbuffer, this only does not employ pty pair
reduced resource usage a little.

It also supports `ld_preload` usage, avoiding extra `execve()`.
2022-09-27 09:00:45 +03:00

14 lines
436 B
Diff

diff --git a/libstdoutisatty.c b/libstdoutisatty.c
index 0516cdd..a5f4762 100644
--- a/libstdoutisatty.c
+++ b/libstdoutisatty.c
@@ -43,7 +43,7 @@ __attribute__ ((constructor)) static void setup(void) {
void *libhdl;
char *dlerr;
- if (!(libhdl=dlopen("libc.so.6", RTLD_LAZY)))
+ if (!(libhdl=dlopen("libc.so", RTLD_LAZY)))
die("Failed to patch library calls: %s", dlerror());
orig_isatty = dlsym(libhdl, "isatty");