From 197cd0994d93ea650efb86a4290e09a0fc63384f Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Thu, 1 Sep 2011 15:23:17 +0100 Subject: [PATCH] stdbuf: fix helper lib identification on some platforms * src/stdbuf.c (main): Pass the path of `stdbuf` rather than the command it's running to the search function. This is significant on platforms without /proc/self/exe Reported by Bruno Haible --- src/stdbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdbuf.c b/src/stdbuf.c index 6fd803c..0e2006b 100644 --- a/src/stdbuf.c +++ b/src/stdbuf.c @@ -354,7 +354,7 @@ main (int argc, char **argv) /* Try to preload libstdbuf first from the same path as stdbuf is running from. */ - set_program_path (argv[0]); + set_program_path (program_name); if (!program_path) program_path = xstrdup (PKGLIBDIR); /* Need to init to non NULL. */ set_LD_PRELOAD (); -- 2.7.4