build: fix build on darwin

Signed-off-by: Weijia Wang <contact@weijia.wang>
This commit is contained in:
Weijia Wang 2022-07-31 13:41:07 +02:00
parent dc2be77f63
commit f9aa9b4a07
7 changed files with 49 additions and 9 deletions

View file

@ -63,7 +63,12 @@ static int timeouts_enabled = 1;
/* set to one if the output goes to the terminal */
static int is_atty = 0;
#ifdef __APPLE__
extern const struct test __start_test_section __asm("section$start$__RODATA$test_section");
extern const struct test __stop_test_section __asm("section$end$__RODATA$test_section");
#else
extern const struct test __start_test_section, __stop_test_section;
#endif
static const struct test *
find_test(const char *name)
@ -308,6 +313,12 @@ is_debugger_attached(void)
return rc;
}
#else
static int
is_debugger_attached(void)
{
return 0;
}
#endif
int main(int argc, char *argv[])