From c58c661c87f007cca7b53ceb8c6de11abcdac061 Mon Sep 17 00:00:00 2001 From: zoecarver Date: Fri, 30 Jun 2023 10:06:22 -0700 Subject: [PATCH] [cxx-interop][nfc] Disable test for strstr on Linux. --- test/Interop/Cxx/stdlib/avoid-import-cxx-math.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/Interop/Cxx/stdlib/avoid-import-cxx-math.swift b/test/Interop/Cxx/stdlib/avoid-import-cxx-math.swift index 861d17f9d6384..82b7e91a35a38 100644 --- a/test/Interop/Cxx/stdlib/avoid-import-cxx-math.swift +++ b/test/Interop/Cxx/stdlib/avoid-import-cxx-math.swift @@ -15,7 +15,13 @@ func test() { // let _ = div(42, 2) let _ = sin(x) let _ = cos(x) + + // strstr comes from stdlib.h or cstdlib on *some* flavors of linux, so it + // won't get imported. We may need a more fine grained approach for those + // platforms. +#if !os(Linux) let _ = strstr("a", "aaa") - +#endif + exit(0) }