mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-04 10:26:02 -05:00
[httpd] Replace syscall with gettid, syscall deprecated on MacOS
This commit is contained in:
parent
a7f44dc3e8
commit
045edf7c55
@ -50,16 +50,10 @@ AC_CHECK_HEADERS([sys/wait.h sys/param.h dirent.h getopt.h stdint.h], [],
|
|||||||
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
|
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
|
||||||
AC_CHECK_HEADERS([time.h], [],
|
AC_CHECK_HEADERS([time.h], [],
|
||||||
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
|
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
|
||||||
AC_CHECK_FUNCS_ONCE([posix_fadvise pipe2 syscall])
|
AC_CHECK_FUNCS_ONCE([posix_fadvise pipe2 gettid])
|
||||||
AC_CHECK_FUNCS([strptime strtok_r], [],
|
AC_CHECK_FUNCS([strptime strtok_r], [],
|
||||||
[AC_MSG_ERROR([[Missing function required to build OwnTone]])])
|
[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
|
dnl check for clock_gettime or replace it
|
||||||
AC_SEARCH_LIBS([clock_gettime], [rt],
|
AC_SEARCH_LIBS([clock_gettime], [rt],
|
||||||
[AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
|
[AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#ifdef HAVE_SYS_GETTID
|
|
||||||
#include <sys/syscall.h> // get thread ID
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <event2/event.h>
|
#include <event2/event.h>
|
||||||
|
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
@ -884,8 +880,8 @@ request_async_cb(void *arg)
|
|||||||
{
|
{
|
||||||
struct httpd_request *hreq = *(struct httpd_request **)arg;
|
struct httpd_request *hreq = *(struct httpd_request **)arg;
|
||||||
|
|
||||||
#if defined(HAVE_SYSCALL) && defined(HAVE_SYS_GETTID)
|
#ifdef HAVE_GETTID
|
||||||
DPRINTF(E_DBG, hreq->module->logdomain, "%s request '%s' in worker thread %ld\n", hreq->module->name, hreq->uri, syscall(SYS_gettid));
|
DPRINTF(E_DBG, hreq->module->logdomain, "%s request '%s' in worker thread %d\n", hreq->module->name, hreq->uri, (int)gettid());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Some handlers require an evbase to schedule events
|
// Some handlers require an evbase to schedule events
|
||||||
|
Loading…
x
Reference in New Issue
Block a user