redmine

Fixed for Linux after 7959ff99

... ... @@ -19,6 +19,18 @@ case $host_os in
[AC_MSG_ERROR("Unable to find libinotify")])
AC_SEARCH_LIBS([backtrace], [execinfo], [],
[AC_MSG_ERROR("Unable to find libexecinfo")])
dnl pthread
AC_CHECK_LIB(pthread, pthread_create)
PTHREAD_LIBS=-pthread
AC_SUBST(PTHREAD_LIBS)
;;
linux*)
dnl pthread
AC_CHECK_LIB([pthread], [pthread_create],
[CPPFLAGS+=" -pthread" LDFLAGS+=" -pthread"],
[AC_MSG_ERROR("Pthread support is mandatory")])
;;
esac
... ... @@ -106,11 +118,6 @@ AC_CHECK_HEADER([dlfcn.h], [], [AC_MSG_ERROR("Unable to find dlfcn.h")])
AC_SEARCH_LIBS([dlopen], [dl], [LDFLAGS="${LDFLAGS} -rdynamic"],
[AC_MSG_ERROR("Unable to find libdl")])
dnl pthread
#AC_CHECK_LIB(pthread, pthread_create)
PTHREAD_LIBS=-pthread
AC_SUBST(PTHREAD_LIBS)
dnl -lrt is needed on < glibc-2.17
#AC_SEARCH_LIBS([clock_getres], [rt], [],
# [AC_MSG_ERROR("Unable to find librt; clock_getres() is needed")])
... ...
... ... @@ -341,7 +341,7 @@ static inline int indexes_outaggr_add(indexes_t *indexes_p, char *outline, event
}
static threadsinfo_t *thread_info() { // TODO: optimize this
static threadsinfo_t threadsinfo={{0},{0},0};
static threadsinfo_t threadsinfo={{{{0}}},{{{0}}},0};
if(!threadsinfo.mutex_init) {
int i=0;
while(i < PTHREAD_MUTEX_MAX) {
... ...