diff --git a/configure.ac b/configure.ac index 17e3f4871..5b8ec3720 100644 --- a/configure.ac +++ b/configure.ac @@ -599,7 +599,7 @@ AC_ARG_ENABLE([stacksize], if test "$ENABLED_STACKSIZE" = "yes" then AC_CHECK_FUNC([posix_memalign], [], [AC_MSG_ERROR(stacksize needs posix_memalign)]) - AC_CHECK_FUNC([pthread_attr_setstack], [], [AC_MSG_ERROR(stacksize needs pthread_attr_setstack)]) + AC_CHECK_FUNC([pthread_attr_setstack], [], AC_CHECK_LIB([pthread],[pthread_attr_setstack])) AM_CFLAGS="$AM_CFLAGS -DHAVE_STACK_SIZE -DCYASSL_LOW_MEMORY" fi diff --git a/cyassl/test.h b/cyassl/test.h index f7259d092..4da2489c1 100644 --- a/cyassl/test.h +++ b/cyassl/test.h @@ -1206,7 +1206,7 @@ static INLINE void StackSizeCheck(func_args* args, thread_func tf) if (ret != 0) err_sys("posix_memalign failed\n"); - memset(myStack, 0xee, stackSize); + memset(myStack, 0x01, stackSize); ret = pthread_attr_init(&myAttr); if (ret != 0) @@ -1227,7 +1227,7 @@ static INLINE void StackSizeCheck(func_args* args, thread_func tf) err_sys("pthread_join failed"); for (i = 0; i < stackSize; i++) { - if (myStack[i] != 0xee) { + if (myStack[i] != 0x01) { break; } }