mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	tests: Fix incompatible pointer type on Debian kfreebsd
Debian kfreebsd uses the GNU libc that uses cpu_set_t instead of cpuset_t Also do not include unnecessary headers on this platform Fixes: #851 Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/356>
This commit is contained in:
		
							parent
							
								
									00bd8e1ef8
								
							
						
					
					
						commit
						b8c656b664
					
				
					 2 changed files with 2 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -22,10 +22,8 @@
 | 
			
		|||
#ifdef HAVE_PTHREAD
 | 
			
		||||
#include <pthread.h>
 | 
			
		||||
#ifdef HAVE_PTHREAD_SETAFFINITY_NP
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 | 
			
		||||
#ifdef __FreeBSD__
 | 
			
		||||
#include <pthread_np.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <sys/param.h>
 | 
			
		||||
#include <sys/cpuset.h>
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -63,7 +61,7 @@ static void thread_func(void *data) {
 | 
			
		|||
 | 
			
		||||
#ifdef HAVE_PTHREAD_SETAFFINITY_NP
 | 
			
		||||
    static pa_atomic_t i_cpu = PA_ATOMIC_INIT(0);
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 | 
			
		||||
#ifdef __FreeBSD__
 | 
			
		||||
    cpuset_t mask;
 | 
			
		||||
#else
 | 
			
		||||
    cpu_set_t mask;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,10 +29,8 @@
 | 
			
		|||
#ifdef HAVE_PTHREAD
 | 
			
		||||
#include <pthread.h>
 | 
			
		||||
#ifdef HAVE_PTHREAD_SETAFFINITY_NP
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 | 
			
		||||
#ifdef __FreeBSD__
 | 
			
		||||
#include <pthread_np.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <sys/param.h>
 | 
			
		||||
#include <sys/cpuset.h>
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -61,7 +59,7 @@ static void work(void *p) {
 | 
			
		|||
 | 
			
		||||
#ifdef HAVE_PTHREAD_SETAFFINITY_NP
 | 
			
		||||
{
 | 
			
		||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 | 
			
		||||
#ifdef __FreeBSD__
 | 
			
		||||
    cpuset_t mask;
 | 
			
		||||
#else
 | 
			
		||||
    cpu_set_t mask;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue