From 566ade5622427999aa9f03c63565bcb763e0a895 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@fb.com>
Date: Sun, 28 Jun 2015 10:35:04 -0700
Subject: [PATCH 2/2] maint: stdbuf.c: avoid the OS X putenv function

* src/stdbuf.c (set_LD_PRELOAD) [__APPLE__]: Use the OS X setenv
function, rather than putenv, per that documentation:
https://developer.apple.com/\
library/mac/documentation/Darwin/Reference/ManPages/man3/putenv.3.html
---
 src/stdbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stdbuf.c b/src/stdbuf.c
index fe4d773..116619d 100644
--- a/src/stdbuf.c
+++ b/src/stdbuf.c
@@ -256,7 +256,7 @@ set_LD_PRELOAD (void)
   ret = putenv (LD_PRELOAD);
 #ifdef __APPLE__
   if (ret == 0)
-    ret = putenv ("DYLD_FORCE_FLAT_NAMESPACE=y");
+    ret = setenv ("DYLD_FORCE_FLAT_NAMESPACE", "y", 1);
 #endif

   if (ret != 0)
-- 
2.3.7

