From: Pádraig Brady Date: Thu, 1 Sep 2011 14:23:17 +0000 (+0100) Subject: stdbuf: fix helper lib identification on some platforms X-Git-Tag: v8.13~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=197cd0994d93ea650efb86a4290e09a0fc63384f;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/src/stdbuf.c b/src/stdbuf.c index 6fd803c955..0e2006b922 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 ();