From: Jorge Pereira Date: Tue, 28 Mar 2023 17:01:34 +0000 (-0300) Subject: Fix pthread.h include (#4943) X-Git-Tag: release_3_2_3~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=656d379c17a898a3ecc4a69967667992b85661a5;p=thirdparty%2Ffreeradius-server.git Fix pthread.h include (#4943) It needs to avoid: src/lib/event.c:127:2: error: call to undeclared function 'pthread_mutex_destroy'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] CC src/lib/getaddrinfo.c pthread_mutex_destroy(&el->mutex); ^ src/lib/event.c:162:9: error: call to undeclared function 'pthread_mutex_init'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] pthread_mutex_init(&el->mutex, NULL); ^ src/lib/event.c:478:2: error: call to undeclared function 'pthread_mutex_lock'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] pthread_mutex_lock(&el->mutex); ^ --- diff --git a/src/lib/event.c b/src/lib/event.c index 2db5d3401d..7a97b83f73 100644 --- a/src/lib/event.c +++ b/src/lib/event.c @@ -28,13 +28,14 @@ RCSID("$Id$") #include #include +#include + #ifdef HAVE_KQUEUE #ifndef HAVE_SYS_EVENT_H #error kqueue requires #else #include -#include #endif #endif /* HAVE_KQUEUE */