[httpd] Fix building on FreeBSD which doesn't have SYS_gettid

This commit is contained in:
ejurgensen
2023-08-29 23:50:19 +02:00
parent 214ef12cb5
commit 4315c73775
2 changed files with 8 additions and 2 deletions

View File

@@ -54,6 +54,12 @@ AC_CHECK_FUNCS_ONCE([posix_fadvise pipe2 syscall])
AC_CHECK_FUNCS([strptime strtok_r], [],
[AC_MSG_ERROR([[Missing function required to build OwnTone]])])
dnl FreeBSD doesn't have SYS_gettid
AC_CHECK_DECL([SYS_gettid],
[AC_DEFINE([HAVE_SYS_GETTID], 1,
[Define to 1 if SYS_gettid exists])],
[], [#include <sys/syscall.h>])
dnl check for clock_gettime or replace it
AC_SEARCH_LIBS([clock_gettime], [rt],
[AC_DEFINE([HAVE_CLOCK_GETTIME], 1,