]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stdbuf: support AIX
authorCollin Funk <collin.funk1@gmail.com>
Mon, 23 Jun 2025 01:13:36 +0000 (18:13 -0700)
committerPádraig Brady <P@draigBrady.com>
Mon, 23 Jun 2025 12:16:32 +0000 (13:16 +0100)
* src/stdbuf.c (set_LD_PRELOAD): Use the AIX specific environment
variables LDR_PRELOAD or LDR_PRELOAD64.
* NEWS: Mention the bugfix.

NEWS
src/stdbuf.c

diff --git a/NEWS b/NEWS
index 82594236841be918b490ac379edfedaece50fd38..8b3d9d3cc256483342811843e6ffc894a81d0b9e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,9 @@ GNU coreutils NEWS                                    -*- outline -*-
   'sort +0.18446744073709551615R input' on 64 bit systems.
   [bug introduced in coreutils-7.2]
 
+  stdbuf now works on AIX.  Previously it would have been ineffective.
+  [bug introduced with the stdbuf program in coreutils-7.5]
+
   tty now exits with status 4 with a special diagnostic if ttyname
   fails even though standard input is a tty.  Formerly it quietly
   pretended that standard input was not a tty.
index ba4246838896f4666412117811cd8e848ea22ad5..9fa9d01f410a55d2ea4bee6df978d57b048d2363 100644 (file)
@@ -192,6 +192,9 @@ set_LD_PRELOAD (void)
   int ret;
 #ifdef __APPLE__
   char const *preload_env = "DYLD_INSERT_LIBRARIES";
+#elif defined _AIX
+  char const *preload_env = (sizeof (void *) < 8
+                             ? "LDR_PRELOAD" : "LDR_PRELOAD64");
 #else
   char const *preload_env = "LD_PRELOAD";
 #endif