From e3866b9df28e7a905b887a091d7260ffd68ece0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 3 Dec 2021 11:39:31 +0200 Subject: [PATCH] test: Fix a symbol collision when building hello-exception on macOS On macOS, the included headers end up including sys/wait.h, which declares a different symbol "wait". --- test/hello-exception.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/hello-exception.cpp b/test/hello-exception.cpp index df1cef6..f93493d 100644 --- a/test/hello-exception.cpp +++ b/test/hello-exception.cpp @@ -39,7 +39,7 @@ private: bool crash = false; bool breakpoint = false; bool noop = false; -bool wait = false; +bool do_wait = false; void done() { } @@ -88,12 +88,12 @@ int main(int argc, char* argv[]) { noop = true; fprintf(stderr, "Calling the function 'done' when recursion stops\n"); } else if (!strcmp(argv[i], "-wait")) { - wait = true; + do_wait = true; fprintf(stderr, "Waiting before exiting\n"); } } recurse(10); - if (wait) { + if (do_wait) { fprintf(stderr, "Waiting\n"); using namespace std::chrono_literals; std::this_thread::sleep_for(10s);