From 275079e3adc184ba3841222918e852c3e63f435f Mon Sep 17 00:00:00 2001 From: nia Date: Sun, 6 Dec 2020 14:47:53 +0100 Subject: [PATCH] util: Avoid pthread_setaffinity_np on NetBSD NetBSD's variant has a different prototype from the Linux version the code expects. It might make sense to add support for NetBSD's version, however, since NetBSD defaults to not allowing non-root users to set processor affinity, there would be little gain here. This is a build fix for NetBSD. Signed-off-by: Nia Alarie Reviewed-by: Dylan Baker CC: 20.3 Part-of: --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 23380319cc5..965e14ff2e9 100644 --- a/meson.build +++ b/meson.build @@ -1400,7 +1400,7 @@ endif dep_thread = dependency('threads') if dep_thread.found() and host_machine.system() != 'windows' pre_args += '-DHAVE_PTHREAD' - if cc.has_function( + if host_machine.system() != 'netbsd' and cc.has_function( 'pthread_setaffinity_np', dependencies : dep_thread, prefix : '#include ',