]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix preprocessor condition for AIX
authorJonathan Wakely <jwakely@redhat.com>
Fri, 20 Mar 2026 00:01:12 +0000 (00:01 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 20 Mar 2026 12:07:16 +0000 (12:07 +0000)
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.

libstdc++-v3/src/c++20/tzdb.cc

index e42ba70dee24cb3465ff180ab7398729bffd4dce..88096d0ae3b0b592a0832be07743413af01458ad 100644 (file)
@@ -40,7 +40,7 @@
 #endif
 #include <filesystem> // filesystem::read_symlink
 
-#ifndef _AIX
+#ifdef _AIX
 # include <cstdlib>   // getenv
 #endif