Fix the build warnings on Mac (#388)

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
This commit is contained in:
Xiaokang Qin
2020-09-18 18:22:26 +08:00
committed by GitHub
parent 2d06567cd1
commit 7c8ccc7c26
7 changed files with 71 additions and 63 deletions

View File

@ -238,9 +238,12 @@ void os_thread_exit(void *retval)
uint8 *os_thread_get_stack_boundary()
{
pthread_t self = pthread_self();
#ifdef __linux__
pthread_attr_t attr;
size_t guard_size;
#endif
uint8 *addr = NULL;
size_t stack_size, guard_size;
size_t stack_size;
int page_size = getpagesize();
size_t max_stack_size = (size_t)
(APP_THREAD_STACK_SIZE_MAX + page_size - 1)