[gcc r15-10992] libstdc++: Fix preprocessor condition for AIX
Jonathan Wakely
redi@gcc.gnu.org
Fri Mar 20 12:27:03 GMT 2026
https://gcc.gnu.org/g:dac1554c8c8f4cb67cf6f1d947b8341a1612985a
commit r15-10992-gdac1554c8c8f4cb67cf6f1d947b8341a1612985a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Mar 20 00:01:12 2026 +0000
libstdc++: Fix preprocessor condition for AIX
Only AIX uses getenv, so including <cstdlib> should be done when _AIX is
defined, not when it's undefined.
libstdc++-v3/ChangeLog:
* src/c++20/tzdb.cc [_AIX]: Change #ifndef to #ifdef.
(cherry picked from commit d2a883a0aee280a6f835eef7a1eda11a6798cc60)
Diff:
---
libstdc++-v3/src/c++20/tzdb.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index 70cd72527879..e92590079f75 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -40,7 +40,7 @@
#endif
#include <filesystem> // filesystem::read_symlink
-#ifndef _AIX
+#ifdef _AIX
# include <cstdlib> // getenv
#endif
More information about the Libstdc++-cvs
mailing list