diff --git a/config.d/pthread.m4 b/config.d/pthread.m4 index ec60e91d2..1e70c3a11 100644 --- a/config.d/pthread.m4 +++ b/config.d/pthread.m4 @@ -3,6 +3,16 @@ if test "x$ac_cv_header_pthread_h" = "xyes"; then case "$host_os" in *qnx*) dnl qnx have all pthread* functions in the libc. ;; + *openbsd*) + LIBS="$LIBS -pthread" + AC_TRY_LINK( + [#include ], + [pthread_attr_t type; + pthread_attr_setstacksize(&type, 0x100000);], + [PTHREAD_LDFLAGS=-pthread], + [PTHREAD_LDFLAGS=-lpthread] + ) + ;; *) LIBS="$LIBS -lpthread" AC_TRY_LINK( [#include ],