Fix complex_test.cpp build failure from new libc++
In file included from bionic/tests/complex_test.cpp:35:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/math.h:366:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__math/hypot.h:21:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__utility/pair.h:22:
In file included from prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__tuple/tuple_like_no_subrange.h:14:
prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__fwd/complex.h:22:1: error: declaration of anonymous class must be a definition
22 | class _LIBCPP_TEMPLATE_VIS complex;
| ^
prebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1/__fwd/complex.h:22:1: error: declaration does not declare anything
2 errors generated.
Bug: http://b/379133546
Test: m libBionicStandardTests
Change-Id: Ib2711e0ae5d45bd59a0490e8cac897fa31fe68f2
diff --git a/tests/complex_test.cpp b/tests/complex_test.cpp
index ed0109a..456efa7 100644
--- a/tests/complex_test.cpp
+++ b/tests/complex_test.cpp
@@ -28,6 +28,10 @@
// have to be naughty.
#include "../libc/include/complex.h"
+// Ensure that libc++'s complex.h and __fwd/complex.h headers are no-ops.
+#define _LIBCPP_COMPLEX_H
+#define _LIBCPP___FWD_COMPLEX_H
+
// (libc++ also seems to have really bad implementations of its own that ignore
// the intricacies of floating point math.)
// http://llvm.org/bugs/show_bug.cgi?id=21504