mirror of
				https://github.com/owntone/owntone-server.git
				synced 2025-10-30 00:05:05 -04:00 
			
		
		
		
	[httpd] Fix building on FreeBSD which doesn't have SYS_gettid
This commit is contained in:
		
							parent
							
								
									214ef12cb5
								
							
						
					
					
						commit
						4315c73775
					
				| @ -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, | ||||
|  | ||||
| @ -34,7 +34,7 @@ | ||||
| #include <stdint.h> | ||||
| #include <inttypes.h> | ||||
| 
 | ||||
| #ifdef HAVE_SYSCALL | ||||
| #ifdef HAVE_SYS_GETTID | ||||
| #include <sys/syscall.h> // get thread ID | ||||
| #endif | ||||
| 
 | ||||
| @ -853,7 +853,7 @@ request_async_cb(void *arg) | ||||
| { | ||||
|   struct httpd_request *hreq = *(struct httpd_request **)arg; | ||||
| 
 | ||||
| #ifdef HAVE_SYSCALL | ||||
| #if defined(HAVE_SYSCALL) && defined(HAVE_SYS_GETTID) | ||||
|   DPRINTF(E_DBG, hreq->module->logdomain, "%s request '%s' in worker thread %ld\n", hreq->module->name, hreq->uri, syscall(SYS_gettid)); | ||||
| #endif | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user