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".
This commit is contained in:
1 parent
6f30aabe97
commit
e3866b9df2
1 file changed
+3
-3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user