[gcc r14-12465] libstdc++: Fix preprocessor condition for AIX
Jonathan Wakely
redi@gcc.gnu.org
Fri Mar 20 12:28:55 GMT 2026
https://gcc.gnu.org/g:50e6b9ae944d6eace32edb59c7e18597f3f2f2d7
commit r14-12465-g50e6b9ae944d6eace32edb59c7e18597f3f2f2d7
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 72f20e7f8282..47d0728d8767 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -37,7 +37,7 @@
#include <mutex> // mutex
#include <filesystem> // filesystem::read_symlink
-#ifndef _AIX
+#ifdef _AIX
# include <cstdlib> // getenv
#endif
More information about the Libstdc++-cvs
mailing list